Skip to content

Commit acfb35a

Browse files
committed
fix: dont handle unread when filter applied
Signed-off-by: Innei <i@innei.in>
1 parent 252962c commit acfb35a

File tree

1 file changed

+4
-2
lines changed
  • src/renderer/src/store/subscription

1 file changed

+4
-2
lines changed

src/renderer/src/store/subscription/store.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ class SubscriptionActions {
128128
const state = get()
129129
for (const feedId in state.data) {
130130
if (state.data[feedId].view === view) {
131-
feedUnreadActions.updateByFeedId(feedId, 0)
131+
// We can not process this logic in local, so skip it. and then we will fetch the unread count from server.
132+
!filter && feedUnreadActions.updateByFeedId(feedId, 0)
132133
entryActions.patchManyByFeedId(feedId, { read: true }, filter)
133134
}
134135
}
@@ -154,7 +155,8 @@ class SubscriptionActions {
154155
}),
155156
async () => {
156157
for (const feedId of feedIds) {
157-
feedUnreadActions.updateByFeedId(feedId, 0)
158+
// We can not process this logic in local, so skip it. and then we will fetch the unread count from server.
159+
!filter && feedUnreadActions.updateByFeedId(feedId, 0)
158160
entryActions.patchManyByFeedId(feedId, { read: true }, filter)
159161
}
160162
if (filter) {

0 commit comments

Comments
 (0)