From f5077005d98eac9cb8bcfdc00995b730f5c0346c Mon Sep 17 00:00:00 2001 From: Anton Vakhrushev Date: Wed, 29 Apr 2020 18:55:57 +0300 Subject: [PATCH] Fix control panel updates --- src/ControlPanel.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ControlPanel.ts b/src/ControlPanel.ts index 7f3a317..7dcecd4 100644 --- a/src/ControlPanel.ts +++ b/src/ControlPanel.ts @@ -96,11 +96,11 @@ export class ControlPanel { state.refresh(); }, 3000); - DataStorage.onChange(() => { + DataStorage.onChange( debounce(() => { state.refresh(); - }, 500); - }); + }, 500) + ); const tasks = this.scheduler.getTaskItems(); const buildingsInQueue = tasks