From 40acb5570f11e67e8c02782b1dc22bcf825fbce3 Mon Sep 17 00:00:00 2001 From: Dmitry Borisenko <67171972+IoTManagerProject@users.noreply.github.com> Date: Wed, 19 Jan 2022 23:03:26 +0100 Subject: [PATCH] =?UTF-8?q?=D0=BE=D0=B1=D1=80=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D0=BA=D0=B0=20=D0=B4=D0=B0=D0=BD=D0=BD=D1=8B=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.svelte | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/App.svelte b/src/App.svelte index 6c9735a..cb739c3 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -190,6 +190,7 @@ //navigation let currentPageName = undefined; + let dataReceivingInProgress = false; router.subscribe(handleNavigation); //****************************************************functions section********************************************************/ @@ -286,6 +287,7 @@ addCoreMsg(data); //if (debug) console.log("[i]", "log data:", data); } else if (data.includes("/config.json")) { + dataReceivingInProgress = true; data = data.replace("/config.json", ""); configJsonBuf = configJsonBuf + data; if (data.includes("]}")) { @@ -294,10 +296,12 @@ configJson = JSON.parse(configJsonBuf); configJsonBuf = []; configJson = configJson; + dataReceivingInProgress = false; if (debug) console.log("[i]", "configJson parsed"); } } } else if (data.includes("/widgets.json")) { + dataReceivingInProgress = true; data = data.replace("/widgets.json", ""); widgetCollectionBuf = widgetCollectionBuf + data; if (data.includes("]}")) { @@ -306,6 +310,7 @@ widgetCollection = JSON.parse(widgetCollectionBuf); widgetCollectionBuf = []; widgetCollection = widgetCollection; + dataReceivingInProgress = false; if (debug) console.log("[i]", "widgetCollection parsed"); } }