mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-11 00:02:28 -04:00
notifications: add modal IPC command for dismissing all popups. rename clearAllPopups() to dismissAllPopups(), since clear is otherwise used to mean eliminated entirely rather than just sent to the notification center. (#1100)
This commit is contained in:
@@ -1088,7 +1088,7 @@ Singleton {
|
|||||||
updateBarConfigs();
|
updateBarConfigs();
|
||||||
|
|
||||||
if (positionChanged) {
|
if (positionChanged) {
|
||||||
NotificationService.clearAllPopups();
|
NotificationService.dismissAllPopups();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1233,7 +1233,7 @@ Singleton {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function sendTestNotifications() {
|
function sendTestNotifications() {
|
||||||
NotificationService.clearAllPopups();
|
NotificationService.dismissAllPopups();
|
||||||
sendTestNotification(0);
|
sendTestNotification(0);
|
||||||
testNotifTimer1.start();
|
testNotifTimer1.start();
|
||||||
testNotifTimer2.start();
|
testNotifTimer2.start();
|
||||||
|
|||||||
@@ -61,6 +61,10 @@ DankModal {
|
|||||||
NotificationService.clearAllNotifications();
|
NotificationService.clearAllNotifications();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function dismissAllPopups () {
|
||||||
|
NotificationService.dismissAllPopups();
|
||||||
|
}
|
||||||
|
|
||||||
modalWidth: 500
|
modalWidth: 500
|
||||||
modalHeight: 700
|
modalHeight: 700
|
||||||
backgroundColor: Theme.withAlpha(Theme.surfaceContainer, Theme.popupTransparency)
|
backgroundColor: Theme.withAlpha(Theme.surfaceContainer, Theme.popupTransparency)
|
||||||
@@ -113,6 +117,11 @@ DankModal {
|
|||||||
return "NOTIFICATION_MODAL_CLEAR_ALL_SUCCESS";
|
return "NOTIFICATION_MODAL_CLEAR_ALL_SUCCESS";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function dismissAllPopups(): string {
|
||||||
|
notificationModal.dismissAllPopups();
|
||||||
|
return "NOTIFICATION_MODAL_DISMISS_ALL_POPUPS_SUCCESS";
|
||||||
|
}
|
||||||
|
|
||||||
target: "notifications"
|
target: "notifications"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -403,7 +403,7 @@ Singleton {
|
|||||||
NotifWrapper {}
|
NotifWrapper {}
|
||||||
}
|
}
|
||||||
|
|
||||||
function clearAllPopups() {
|
function dismissAllPopups() {
|
||||||
for (const w of visibleNotifications) {
|
for (const w of visibleNotifications) {
|
||||||
if (w) {
|
if (w) {
|
||||||
w.popup = false;
|
w.popup = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user