fix: updating store after mark read by list

This commit is contained in:
DIYgod
2025-03-25 16:25:30 +08:00
parent 305c4bcc7c
commit e8305f890e
@@ -326,7 +326,13 @@ class SubscriptionActions {
})
tx.optimistic(() => {
if (listId) {
feedUnreadActions.updateByFeedId(listId, 0)
const listFeedIds = getListById(listId)?.feedIds
if (listFeedIds) {
for (const feedId of listFeedIds) {
feedUnreadActions.updateByFeedId(feedId, 0)
entryActions.patchManyByFeedId(feedId, { read: true }, filter)
}
}
} else if (inboxId) {
feedUnreadActions.updateByFeedId(inboxId, 0)
entryActions.patchManyByFeedId(inboxId, { read: true }, filter)