mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 13:32:50 -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
|
||||
modalHeight: 700
|
||||
backgroundColor: Theme.withAlpha(Theme.surfaceContainer, Theme.popupTransparency)
|
||||
@@ -104,6 +108,11 @@ DankModal {
|
||||
return "NOTIFICATION_MODAL_TOGGLE_DND_SUCCESS";
|
||||
}
|
||||
|
||||
function clearAll(): string {
|
||||
notificationModal.clearAll();
|
||||
return "NOTIFICATION_MODAL_CLEAR_ALL_SUCCESS";
|
||||
}
|
||||
|
||||
target: "notifications"
|
||||
}
|
||||
|
||||
|
||||
@@ -414,6 +414,9 @@ Singleton {
|
||||
}
|
||||
|
||||
function clearAllNotifications() {
|
||||
if (!notifications.length) {
|
||||
return;
|
||||
}
|
||||
bulkDismissing = true;
|
||||
popupsDisabled = true;
|
||||
addGate.stop();
|
||||
|
||||
Reference in New Issue
Block a user