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:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user