mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-08-02 03:28:28 -04:00
feat(ipc): add 'dismiss' function to notifications ipc (#2942)
Allow to dismiss the last visible notification only instead of resorting directly to dismissAllPopups.
This commit is contained in:
@@ -64,6 +64,10 @@ DankModal {
|
||||
NotificationService.dismissAllPopups();
|
||||
}
|
||||
|
||||
function dismissLastNotification() {
|
||||
NotificationService.dismissLastNotification();
|
||||
}
|
||||
|
||||
modalWidth: Math.min(500, screenWidth - 48)
|
||||
modalHeight: Math.min(700, screenHeight * 0.85)
|
||||
backgroundColor: Theme.withAlpha(Theme.surfaceContainer, Theme.popupTransparency)
|
||||
@@ -190,6 +194,11 @@ DankModal {
|
||||
return "NOTIFICATION_MODAL_DISMISS_ALL_POPUPS_SUCCESS";
|
||||
}
|
||||
|
||||
function dismiss(): string {
|
||||
notificationModal.dismissLastNotification();
|
||||
return "NOTIFICATION_DISMISS_SUCCESS";
|
||||
}
|
||||
|
||||
target: "notifications"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user