Skip to content

Commit

Permalink
fix: dont handle unread when filter applied
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <i@innei.in>
  • Loading branch information
Innei committed Aug 7, 2024
1 parent 252962c commit acfb35a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/renderer/src/store/subscription/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand All @@ -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) {
Expand Down

0 comments on commit acfb35a

Please sign in to comment.