1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-06-23 11:35:25 -04:00

notifications: respect expireTimeout set by notifiers

This commit is contained in:
bbedward
2026-06-22 12:33:51 -04:00
parent fdbbcafb6c
commit 4e1c921ffb
@@ -771,6 +771,11 @@ Singleton {
interval: { interval: {
if (!wrapper.notification) if (!wrapper.notification)
return 5000; return 5000;
// Honor an app-specified expire timeout (seconds); -1 means the
// app deferred to the server, so fall back to our per-urgency settings.
const appTimeout = wrapper.notification.expireTimeout;
if (appTimeout >= 0)
return Math.round(appTimeout * 1000);
switch (wrapper.urgency) { switch (wrapper.urgency) {
case NotificationUrgency.Low: case NotificationUrgency.Low:
return SettingsData.notificationTimeoutLow; return SettingsData.notificationTimeoutLow;