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:
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user