mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
Merge pull request #476 from lonerOrz/feat/ipc-notification-dismiss
feat(ipc): Add commands to dismiss notifications
This commit is contained in:
@@ -43,6 +43,14 @@ Item {
|
||||
function clear() {
|
||||
NotificationService.clearHistory()
|
||||
}
|
||||
|
||||
function dismissOldest() {
|
||||
NotificationService.dismissOldestActive()
|
||||
}
|
||||
|
||||
function dismissAll() {
|
||||
NotificationService.dismissAllActive()
|
||||
}
|
||||
}
|
||||
|
||||
IpcHandler {
|
||||
|
||||
@@ -414,6 +414,13 @@ Singleton {
|
||||
removeActive(id)
|
||||
}
|
||||
|
||||
function dismissOldestActive() {
|
||||
if (activeList.count > 0) {
|
||||
const lastNotif = activeList.get(activeList.count - 1)
|
||||
dismissActiveNotification(lastNotif.id)
|
||||
}
|
||||
}
|
||||
|
||||
function dismissAllActive() {
|
||||
Object.values(activeMap).forEach(n => n.dismiss())
|
||||
activeList.clear()
|
||||
|
||||
Reference in New Issue
Block a user