timeout on heal call to allow alert to show
This commit is contained in:
parent
32f7c236a0
commit
65cc62d172
1 changed files with 13 additions and 11 deletions
|
|
@ -862,18 +862,20 @@ console.log/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
|
||||||
} else {
|
} else {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let healed = 0;
|
setTimeout(() => {
|
||||||
for (let w of widgets) {
|
let healed = 0;
|
||||||
if (w.heal()) {
|
for (let w of widgets) {
|
||||||
healed++;
|
if (w.heal()) {
|
||||||
|
healed++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
API.hide.alert(marker);
|
||||||
API.hide.alert(marker);
|
if (healed) {
|
||||||
if (healed) {
|
API.show.alert(`${healed} Object${healed ? 's':''} healed`);
|
||||||
API.show.alert(`${healed} Object${healed ? 's':''} healed`);
|
} else {
|
||||||
} else {
|
API.show.alert('Nothing found to heal');
|
||||||
API.show.alert('Nothing found to heal');
|
}
|
||||||
}
|
}, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
function forAllWidgets(f) {
|
function forAllWidgets(f) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue