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).
This commit is contained in:
Johannes Millan 2026-04-14 21:38:12 +02:00
parent ba6869975b
commit 08fdea1772

View file

@ -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