May not be necessary but seems like a good idea?
parent
71494ebb38
commit
cd8aa6974d
|
|
@ -1145,15 +1145,17 @@ class TimerMenu {
|
||||||
|
|
||||||
|
|
||||||
function switch_UI(new_UI) {
|
function switch_UI(new_UI) {
|
||||||
// Switch from one UI to another. The new UI instance is passed as a
|
// Switch from one UI mode to another (after current call stack
|
||||||
// parameter. The old UI is stopped and cleaned up, and the new
|
// completes). The new UI instance is passed as a parameter. The old
|
||||||
// UI is started.
|
// UI is stopped and cleaned up, and the new UI is started.
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
if (CURRENT_UI) {
|
if (CURRENT_UI) {
|
||||||
CURRENT_UI.stop();
|
CURRENT_UI.stop();
|
||||||
}
|
}
|
||||||
CURRENT_UI = new_UI;
|
CURRENT_UI = new_UI;
|
||||||
CURRENT_UI.start();
|
CURRENT_UI.start();
|
||||||
|
}, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue