mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-16 13:05:14 +03:00
fix(app): mark Home sessions read before they are loaded (#57302)
This commit is contained in:
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)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user