fix: can not mark entry as unread, close #4039

This commit is contained in:
Stephen Zhou 2025-07-01 11:52:56 +08:00
parent 352e8ef3a1
commit 8ea13a3fb5
No known key found for this signature in database
1 changed files with 9 additions and 3 deletions

View File

@ -196,9 +196,15 @@ class UnreadSyncService {
})
tx.request(async () => {
await apiClient().reads.$post({
json: { entryIds: [entryId] },
})
if (read) {
await apiClient().reads.$post({
json: { entryIds: [entryId] },
})
} else {
await apiClient().reads.$delete({
json: { entryId },
})
}
})
tx.rollback(() => {