Release v1.0.7: General bugfixes
This commit is contained in:
10
main.js
10
main.js
@@ -595,6 +595,9 @@ var FocusTaskPlugin = class extends import_obsidian3.Plugin {
|
||||
const loaded = await this.loadData();
|
||||
this.data = Object.assign({}, DEFAULT_DATA, (loaded == null ? void 0 : loaded.data) || {});
|
||||
this.settings = Object.assign({}, DEFAULT_SETTINGS, (loaded == null ? void 0 : loaded.settings) || {});
|
||||
if (!this.settings.lists || this.settings.lists.length === 0) {
|
||||
this.settings.lists = DEFAULT_SETTINGS.lists;
|
||||
}
|
||||
this.focusSecondsToday = (this.data.totalFocusMinutesToday || 0) * 60;
|
||||
}
|
||||
async saveAllData() {
|
||||
@@ -785,7 +788,7 @@ var FocusTaskPlugin = class extends import_obsidian3.Plugin {
|
||||
this.isBreakMode = false;
|
||||
this.currentTimerSeconds = this.settings.pomodoroWorkMinutes * 60;
|
||||
this.isTimerRunning = true;
|
||||
this.secondsWorkedOnCurrentTask = task.actualMinutes * 60;
|
||||
this.secondsWorkedOnCurrentTask = Math.floor(task.actualMinutes * 60);
|
||||
this.timerStartTimestamp = Date.now();
|
||||
this.pausedTimeRemaining = this.currentTimerSeconds;
|
||||
this.refreshView();
|
||||
@@ -794,7 +797,10 @@ var FocusTaskPlugin = class extends import_obsidian3.Plugin {
|
||||
this.currentTimerSeconds--;
|
||||
if (!this.isBreakMode) {
|
||||
this.secondsWorkedOnCurrentTask++;
|
||||
task.actualMinutes = Math.floor(this.secondsWorkedOnCurrentTask / 60);
|
||||
const actualMinutes = Math.floor(this.secondsWorkedOnCurrentTask / 60);
|
||||
if (task.actualMinutes !== actualMinutes) {
|
||||
task.actualMinutes = actualMinutes;
|
||||
}
|
||||
this.focusSecondsToday++;
|
||||
}
|
||||
this.updateStatusBar();
|
||||
|
||||
Reference in New Issue
Block a user