runplus: sync exstats state with recorder (on load)

master
Rob Pilling 2025-04-23 08:36:45 +01:00
parent dbe1886274
commit cbf3775e4d
2 changed files with 6 additions and 1 deletions

View File

@ -32,4 +32,4 @@ Write to correct settings file, fixing settings not working.
0.29: Optimise UI: only redraw if we showed a recorder menu and correctly
track screen state
0.30: Change the "time" stat to show active time (duration) rather than
elapsed time (fix #3802)
elapsed time (fix #3802), and sync with recorder on load

View File

@ -51,6 +51,11 @@ let statIDs = [settings.B1,settings.B2,settings.B3,settings.B4,settings.B5,setti
let exs = ExStats.getStats(statIDs, settings);
// ---------------------------
// handle the case where we were stopped outside of the app
if(exs.state.active && settings.record && require("recorder") && !require("recorder").isRecording()){
exs.stop();
}
function setStatus(running) {
layout.button.label = running ? "STOP" : "START";
layout.status.label = running ? "RUN" : "STOP";