From 62af66b5aeeca93de7c72592ef0a12d5572d90bb Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Fri, 2 Jan 2026 22:53:18 +0200 Subject: [PATCH] feat(save_indicator): report saving and saved states --- apps/client/src/services/spaced_update.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/client/src/services/spaced_update.ts b/apps/client/src/services/spaced_update.ts index 863c6844a..1347d3757 100644 --- a/apps/client/src/services/spaced_update.ts +++ b/apps/client/src/services/spaced_update.ts @@ -33,7 +33,9 @@ export default class SpacedUpdate { this.changed = false; // optimistic... try { + this.stateCallback?.("saving"); await this.updater(); + this.stateCallback?.("saved"); } catch (e) { this.changed = true; @@ -72,7 +74,9 @@ export default class SpacedUpdate { } if (Date.now() - this.lastUpdated > this.updateInterval) { + this.stateCallback?.("saving"); this.updater(); + this.stateCallback?.("saved"); this.lastUpdated = Date.now(); this.changed = false; } else {