fix: mark read for inbox entry

This commit is contained in:
Stephen Zhou 2025-07-08 00:01:02 +08:00
parent 3f1ed0a9c5
commit 7c1bf99318
No known key found for this signature in database
1 changed files with 3 additions and 2 deletions

View File

@ -186,6 +186,7 @@ class UnreadSyncService {
if (!entry || entry.read === read || (!entry.feedId && !entry.inboxHandle)) return
const id: FeedIdOrInboxHandle = entry.inboxHandle || entry.feedId || ""
const isInbox = !!entry.inboxHandle
const tx = createTransaction()
tx.store(() => {
@ -200,11 +201,11 @@ class UnreadSyncService {
tx.request(async () => {
if (read) {
await apiClient().reads.$post({
json: { entryIds: [entryId] },
json: { entryIds: [entryId], isInbox },
})
} else {
await apiClient().reads.$delete({
json: { entryId },
json: { entryId, isInbox },
})
}
})