Fixed 'resume' (start) on non-played plans

main 1.8.8
isark 1 year ago
parent 66a738389c
commit fa8c21e16c

@ -8,7 +8,7 @@
},
"package": {
"productName": "Nothing",
"version": "1.8.7"
"version": "1.8.8"
},
"tauri": {
"systemTray": {

@ -160,6 +160,7 @@ export class TimeTrackerService {
} else {
this.setCurrentRunHistory(this.createNew(plan.name));
this.currentRunHistory!.plan = plan;
this.resumeOnNext = true;
}
}
@ -256,7 +257,6 @@ export class TimeTrackerService {
}
public stop() {
console.log("Stopping stopwatch");
if (this.timerSubscription && !this.timerSubscription.closed) this.timerSubscription.unsubscribe();
if (this.debouncedSaveStopwatch && !this.debouncedSaveStopwatch.closed) this.debouncedSaveStopwatch.unsubscribe();
@ -334,6 +334,7 @@ export class TimeTrackerService {
break;
case Resume.Discard:
this.setCurrentRunHistory(this.createNew(plan.name));
this.loadReachedCheckpoints();
plan.last_stored_time = this.currentRunHistory!.uuid;
this.resumeOnNext = true;
plan.requestSelfSave();

Loading…
Cancel
Save