feat(notifications): Phase 675 mark-notifications-read batch IPC (v0.8.650)

Add mark-notifications-read and restore-notifications-read handlers with
composer-focus-channel emission after batch mark-read for Discord parity.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-06-02 22:36:16 -04:00
co-authored by Cursor
parent b091f27517
commit 010d70ad40
+18
View File
@@ -1338,6 +1338,24 @@ async function dispatchUiMessage (platform, msg, hooks = {}) {
notificationChannelId: row.channelId
})
}
if (platform.activeChannelId) {
send({ type: 'composer-focus-channel', channelId: platform.activeChannelId })
}
return true
}
if (t === 'mark-notifications-read') {
const out = await platform.markNotificationsReadBatch(msg.notificationIds || [])
pushState()
send({ type: 'mark-notifications-read-cleared', marked: out.marked })
if (platform.activeChannelId) {
send({ type: 'composer-focus-channel', channelId: platform.activeChannelId })
}
return true
}
if (t === 'restore-notifications-read') {
const out = await platform.restoreNotificationReadState(msg.snapshot || [])
pushState()
send({ type: 'restore-notifications-read-cleared', restored: out.restored })
return true
}
if (t === 'open-notification') {