Fix back when accessing TimerEditMenu via quick action

Going to TimerEditMenu directly from a quick action and then entering
Name or Start causes TimerEditMenu's back button not to go straight
back to TimerView because TimerEditMenu's overridden back action gets
lost. Solve this by making Name and Start's back actions return to the
existing instance of TimerEditMenu rather than creating a new one.
master
Travis Evans 2025-05-04 15:15:34 -05:00
parent 37d567715d
commit 73cd8122df
1 changed files with 8 additions and 2 deletions

View File

@ -998,12 +998,18 @@ class TimerEditMenu {
keyboard.input({text:this.timer.name}).then(text => {
this.timer.name = text;
tt.set_timers_dirty();
switch_UI(new TimerViewMenu(this.timer));
switch_UI(this);
});
}, 0);
}
},
'Start': () => { switch_UI(new TimerEditStart(this.timer)); },
'Start': () => {
switch_UI(new TimerEditStart(
this.timer,
() => { switch_UI(this); }
)
);
},
'At end': {
// Option to auto-start another timer when this one ends
format: v => v === -1