diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-02-22 20:35:20 +1100 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-02-22 20:35:20 +1100 |
| commit | 2d979684453659318daf794febafb0887a12fb50 (patch) | |
| tree | 2fd8131c34bc59e50d001938fe29021732e520c8 /src/services/storage.ts | |
| parent | notifpopups: close all popups when notifs open (diff) | |
| download | caelestia-shell-2d979684453659318daf794febafb0887a12fb50.tar.gz caelestia-shell-2d979684453659318daf794febafb0887a12fb50.tar.bz2 caelestia-shell-2d979684453659318daf794febafb0887a12fb50.zip | |
config: dynamic service confs
Diffstat (limited to 'src/services/storage.ts')
| -rw-r--r-- | src/services/storage.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/services/storage.ts b/src/services/storage.ts index e1e1c55..3f8992d 100644 --- a/src/services/storage.ts +++ b/src/services/storage.ts @@ -56,6 +56,10 @@ export default class Storage extends GObject.Object { constructor() { super(); - interval(config.interval, () => this.update()); + let source = interval(config.interval.get(), () => this.update()); + config.interval.subscribe(i => { + source.cancel(); + source = interval(i, () => this.update()); + }); } } |