fix(app): mark Home sessions read before they are loaded (#57302)

This commit is contained in:
Luke Parker
2026-10-20 15:39:20 +10:00
committed by GitHub
Unverified
parent f2735ef79b
commit 635146377e
@@ -266,7 +266,11 @@ export function createSessionInbox() {
.reply({ sessionID: request.sessionID, requestID: request.id, decision })
.catch(requestFailed)
},
markViewed: (entry: InboxEntry) => entry.ctx.notification.session.markViewed(entry.session.id),
// Marking viewed reads the loaded session, and rows from the index usually are not loaded, so load it first.
markViewed: (entry: InboxEntry) => {
if (!entry.ctx.data.session.get(entry.session.id)) entry.ctx.data.session.remember(entry.session)
entry.ctx.notification.session.markViewed(entry.session.id)
},
}
}