1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-11 07:52:50 -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

@@ -69,6 +69,7 @@ Singleton {
bodyMarkupSupported: true
imageSupported: true
inlineReplySupported: true
persistenceSupported: true
onNotification: notif => {
notif.tracked = true
@@ -106,11 +107,24 @@ Singleton {
}
readonly property Timer timer: Timer {
interval: 5000
interval: {
if (!wrapper.notification) return 5000
switch (wrapper.notification.urgency) {
case NotificationUrgency.Low:
return SettingsData.notificationTimeoutLow
case NotificationUrgency.Critical:
return SettingsData.notificationTimeoutCritical
default:
return SettingsData.notificationTimeoutNormal
}
}
repeat: false
running: false
onTriggered: {
wrapper.popup = false
if (interval > 0) {
wrapper.popup = false
}
}
}
@@ -302,6 +316,11 @@ Singleton {
visibleNotifications = [...visibleNotifications, next]
next.popup = true
// Start timeout timer if timeout > 0 (0 means never timeout)
if (next.timer.interval > 0) {
next.timer.start()
}
addGateBusy = true
addGate.restart()
}