Skip to content

Commit

Permalink
fix: do not update action setting for archived query
Browse files Browse the repository at this point in the history
  • Loading branch information
hyoban committed Nov 19, 2024
1 parent 9e45d04 commit 4adcded
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/renderer/src/store/entry/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ class EntryActions {
})

if (data.data) {
this.upsertMany(data.data)
this.upsertMany(data.data, { isArchived })
}
return data
}
Expand Down Expand Up @@ -241,7 +241,7 @@ class EntryActions {
})
}

upsertMany(data: CombinedEntryModel[]) {
upsertMany(data: CombinedEntryModel[], options?: { isArchived?: boolean }) {
const feeds = [] as FeedOrListRespModel[]
const entries = [] as EntryModel[]
const inboxes = [] as InboxModel[]
Expand Down Expand Up @@ -346,7 +346,7 @@ class EntryActions {
}
}

if (item.settings && draft.flatMapEntries[item.entries.id]) {
if (item.settings && draft.flatMapEntries[item.entries.id] && !options?.isArchived) {
draft.flatMapEntries[item.entries.id].settings = item.settings
}
}
Expand Down

0 comments on commit 4adcded

Please sign in to comment.