File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
apps/desktop/src/routes/[projectId] Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change 255255
256256 // Auto-fetch setup
257257 async function fetchRemoteForProject() {
258- if (baseBranch ?.lastFetchedMs && Date .now () - baseBranch .lastFetchedMs > 30 * 60 * 1000 ) {
259- await baseBranchService .fetchFromRemotes (projectId , ' auto' );
260- }
258+ await baseBranchService .fetchFromRemotes (projectId , ' auto' );
261259 }
262260
263261 function setupFetchInterval() {
264262 const autoFetchIntervalMinutes = $settingsStore ?.fetch .autoFetchIntervalMinutes || 15 ;
263+ clearFetchInterval ();
264+
265265 if (autoFetchIntervalMinutes < 0 ) {
266266 return ;
267267 }
268268 fetchRemoteForProject ();
269- clearFetchInterval ();
270269 const intervalMs = autoFetchIntervalMinutes * 60 * 1000 ;
271- intervalId = setInterval (async () => {
272- await fetchRemoteForProject ();
273- }, intervalMs );
270+ intervalId = setInterval (async () => await fetchRemoteForProject (), intervalMs );
274271
275272 return () => clearFetchInterval ();
276273 }
You can’t perform that action at this time.
0 commit comments