fix: dont handle unread when filter applied

Signed-off-by: Innei <i@innei.in>
This commit is contained in:
Innei 2024-08-07 14:16:06 +08:00
parent 252962c188
commit acfb35abd0
No known key found for this signature in database
GPG Key ID: 0F62D33977F021F7
1 changed files with 4 additions and 2 deletions

View File

@ -128,7 +128,8 @@ class SubscriptionActions {
const state = get()
for (const feedId in state.data) {
if (state.data[feedId].view === view) {
feedUnreadActions.updateByFeedId(feedId, 0)
// We can not process this logic in local, so skip it. and then we will fetch the unread count from server.
!filter && feedUnreadActions.updateByFeedId(feedId, 0)
entryActions.patchManyByFeedId(feedId, { read: true }, filter)
}
}
@ -154,7 +155,8 @@ class SubscriptionActions {
}),
async () => {
for (const feedId of feedIds) {
feedUnreadActions.updateByFeedId(feedId, 0)
// We can not process this logic in local, so skip it. and then we will fetch the unread count from server.
!filter && feedUnreadActions.updateByFeedId(feedId, 0)
entryActions.patchManyByFeedId(feedId, { read: true }, filter)
}
if (filter) {