1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-06 21:45:38 -05:00

stash n otifs

This commit is contained in:
bbedward
2025-08-12 10:44:55 -04:00
parent 5c3d79eef7
commit de91eb8afa
10 changed files with 1006 additions and 20 deletions

View File

@@ -172,10 +172,16 @@ QtObject {
if (activeWindows.length <= maxTargetNotifications + 1)
return
const b = _bottom()
if (b && !b.exiting) {
b.notificationData.removedByLimit = true
b.notificationData.popup = false
// Find the bottom-most non-critical notification to remove
const candidates = activeWindows.filter(p => {
return p.notificationData && p.notificationData.notification &&
p.notificationData.notification.urgency !== 2 // NotificationUrgency.Critical = 2
}).sort((a, b) => b.screenY - a.screenY) // Sort by Y position, highest first
const toRemove = candidates[0] // Get the bottom-most non-critical notification
if (toRemove && !toRemove.exiting) {
toRemove.notificationData.removedByLimit = true
toRemove.notificationData.popup = false
}
}