mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-30 08:22:51 -05:00
notifications: add modal function for clearing all (#1082)
This commit is contained in:
@@ -57,6 +57,10 @@ DankModal {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function clearAll() {
|
||||||
|
NotificationService.clearAllNotifications();
|
||||||
|
}
|
||||||
|
|
||||||
modalWidth: 500
|
modalWidth: 500
|
||||||
modalHeight: 700
|
modalHeight: 700
|
||||||
backgroundColor: Theme.withAlpha(Theme.surfaceContainer, Theme.popupTransparency)
|
backgroundColor: Theme.withAlpha(Theme.surfaceContainer, Theme.popupTransparency)
|
||||||
@@ -104,6 +108,11 @@ DankModal {
|
|||||||
return "NOTIFICATION_MODAL_TOGGLE_DND_SUCCESS";
|
return "NOTIFICATION_MODAL_TOGGLE_DND_SUCCESS";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function clearAll(): string {
|
||||||
|
notificationModal.clearAll();
|
||||||
|
return "NOTIFICATION_MODAL_CLEAR_ALL_SUCCESS";
|
||||||
|
}
|
||||||
|
|
||||||
target: "notifications"
|
target: "notifications"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -414,6 +414,9 @@ Singleton {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function clearAllNotifications() {
|
function clearAllNotifications() {
|
||||||
|
if (!notifications.length) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
bulkDismissing = true;
|
bulkDismissing = true;
|
||||||
popupsDisabled = true;
|
popupsDisabled = true;
|
||||||
addGate.stop();
|
addGate.stop();
|
||||||
|
|||||||
Reference in New Issue
Block a user