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

main 1.8.8
isark 1 year ago
parent 66a738389c
commit fa8c21e16c

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

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

Loading…
Cancel
Save