Skip to content

Commit

Permalink
fix: disable fetch when focus
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <i@innei.in>
  • Loading branch information
Innei committed Jul 16, 2024
1 parent f9eba59 commit fbd795d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/renderer/src/modules/entry-column/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export const useEntriesByView = () => {
id: level === levels.folder ? folderIds?.join(",") : feedId,
view,
...(unreadOnly === true && { read: false }),

})
const remoteEntryIds = query.data?.pages
?.map((page) => page.data?.map((entry) => entry.entries.id))
Expand Down
2 changes: 2 additions & 0 deletions src/renderer/src/queries/entries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ export const useEntries = ({
},
initialPageParam: undefined,
refetchInterval: 1000 * 60 * 10,
refetchOnWindowFocus: false,
refetchOnReconnect: false,
})

export const useEntriesPreview = ({ id }: { id?: string }) =>
Expand Down

0 comments on commit fbd795d

Please sign in to comment.