From 65cc62d1721302facb6bf84ef0a8e927ad885f4d Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Tue, 7 Sep 2021 13:39:54 -0400 Subject: [PATCH] timeout on heal call to allow alert to show --- src/kiri/main.js | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/kiri/main.js b/src/kiri/main.js index c876662e..4a565b95 100644 --- a/src/kiri/main.js +++ b/src/kiri/main.js @@ -862,18 +862,20 @@ console.log/** Copyright Stewart Allen -- All Rights Reserved */ } else { return; } - let healed = 0; - for (let w of widgets) { - if (w.heal()) { - healed++; + setTimeout(() => { + let healed = 0; + for (let w of widgets) { + if (w.heal()) { + healed++; + } } - } - API.hide.alert(marker); - if (healed) { - API.show.alert(`${healed} Object${healed ? 's':''} healed`); - } else { - API.show.alert('Nothing found to heal'); - } + API.hide.alert(marker); + if (healed) { + API.show.alert(`${healed} Object${healed ? 's':''} healed`); + } else { + API.show.alert('Nothing found to heal'); + } + }, 1); } function forAllWidgets(f) {