From 08fdea1772960e8af1d8cc0ce06cd307006f97f6 Mon Sep 17 00:00:00 2001 From: Johannes Millan Date: Tue, 14 Apr 2026 21:38:12 +0200 Subject: [PATCH] fix(sync): add periodic interval timer for Electron and web sync triggers The non-Android sync trigger merge was missing a recurring timer, so file changes written by external tools (e.g. Syncthing on Linux) were never detected without user activity. Add timer(syncInterval, syncInterval) to the merge so sync fires at the configured interval on Electron desktop and PWA. Fixes: Linux auto-sync ignoring configured interval (#4783). --- src/app/imex/sync/sync-trigger.service.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/app/imex/sync/sync-trigger.service.ts b/src/app/imex/sync/sync-trigger.service.ts index 1cb6b6b59c..06543ceb4f 100644 --- a/src/app/imex/sync/sync-trigger.service.ts +++ b/src/app/imex/sync/sync-trigger.service.ts @@ -231,6 +231,11 @@ export class SyncTriggerService { this._isOnlineTrigger$, this._onIdleTrigger$, this._onElectronResumeTrigger$, + // Periodic interval timer: fires every syncInterval ms to detect external file + // changes (e.g. Syncthing on Linux) even without user activity. + // Applies to Electron desktop and web/PWA (not Android, which has its own timer). + // Fixes: Linux auto-sync ignoring interval (#4783) + timer(syncInterval, syncInterval).pipe(mapTo('I_INTERVAL_TIMER')), ); return merge( // once immediately