1
0
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:
Ethan Todd
2025-12-18 08:28:58 -05:00
committed by GitHub
parent 78a5f401d7
commit 7d81445341
2 changed files with 12 additions and 0 deletions

View File

@@ -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"
}

View File

@@ -414,6 +414,9 @@ Singleton {
}
function clearAllNotifications() {
if (!notifications.length) {
return;
}
bulkDismissing = true;
popupsDisabled = true;
addGate.stop();