General Bugfixes
This commit is contained in:
5
main.js
5
main.js
@@ -719,6 +719,8 @@ var FocusTaskPlugin = class extends import_obsidian3.Plugin {
|
||||
const now = Date.now();
|
||||
const elapsedMs = now - this.timerStartTimestamp;
|
||||
const elapsedSeconds = Math.floor(elapsedMs / 1e3);
|
||||
if (elapsedSeconds < 1)
|
||||
return;
|
||||
if (this.isBreakMode) {
|
||||
this.currentTimerSeconds = Math.max(0, this.pausedTimeRemaining - elapsedSeconds);
|
||||
if (this.currentTimerSeconds <= 0) {
|
||||
@@ -743,6 +745,8 @@ var FocusTaskPlugin = class extends import_obsidian3.Plugin {
|
||||
this.focusSecondsToday += elapsedSeconds;
|
||||
}
|
||||
}
|
||||
this.timerStartTimestamp = now;
|
||||
this.pausedTimeRemaining = this.currentTimerSeconds;
|
||||
this.updateStatusBar();
|
||||
this.updateTimerDisplay();
|
||||
this.saveAllData();
|
||||
@@ -899,6 +903,7 @@ var FocusTaskPlugin = class extends import_obsidian3.Plugin {
|
||||
const task = this.data.tasks.find((t) => t.id === this.activeTaskId);
|
||||
if (task) {
|
||||
task.isActive = false;
|
||||
task.actualMinutes = 0;
|
||||
}
|
||||
}
|
||||
this.isTimerRunning = false;
|
||||
|
||||
Reference in New Issue
Block a user