From 58af5c5ed947f893584b1333bb5a63816b33e578 Mon Sep 17 00:00:00 2001 From: retrozinndev Date: Wed, 25 Jun 2025 21:48:40 -0300 Subject: [PATCH] :boom: fix(scripts/config): hot-reload only working on first time --- ags/scripts/config.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ags/scripts/config.ts b/ags/scripts/config.ts index 80ff6d4..7fe290b 100644 --- a/ags/scripts/config.ts +++ b/ags/scripts/config.ts @@ -113,15 +113,17 @@ class Config extends GObject.Object implements Subscribable { } monitorFile(this.#file.get_path()!, - async () => { + () => { if(this.timeout) return; - this.timeout = timeout(300, () => this.timeout = undefined); + this.timeout = timeout(500, () => this.timeout = undefined); if(this.#file.query_exists(null)) { this.timeout?.cancel(); this.timeout = true; - this.readFile(); + this.readFile().finally(() => + this.timeout = undefined); + return; }