May not be necessary but seems like a good idea?

master
Travis Evans 2025-05-03 21:39:31 -05:00
parent 71494ebb38
commit cd8aa6974d
1 changed files with 10 additions and 8 deletions

View File

@ -1145,15 +1145,17 @@ class TimerMenu {
function switch_UI(new_UI) {
// Switch from one UI to another. The new UI instance is passed as a
// parameter. The old UI is stopped and cleaned up, and the new
// UI is started.
// Switch from one UI mode to another (after current call stack
// completes). The new UI instance is passed as a parameter. The old
// UI is stopped and cleaned up, and the new UI is started.
if (CURRENT_UI) {
CURRENT_UI.stop();
}
CURRENT_UI = new_UI;
CURRENT_UI.start();
setTimeout(() => {
if (CURRENT_UI) {
CURRENT_UI.stop();
}
CURRENT_UI = new_UI;
CURRENT_UI.start();
}, 0);
}