Skip to content

Commit cf950a4

Browse files
committed
feat(pomodoro): unset lastCurrentTask on pomodoro stop #32
1 parent f780eff commit cf950a4

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

app-src/scripts/main/global-services/tasks-s.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,10 @@
140140
return this.$rootScope.r.lastCurrentTask;
141141
}
142142

143+
setLastCurrent(task) {
144+
this.$rootScope.r.lastCurrentTask = task;
145+
}
146+
143147
// NOTE: doneBacklogTasks can't be really updated when accessed withthis
144148
getById(taskId) {
145149
const doneBacklogTasks = this.getDoneBacklog();

app-src/scripts/pomodoro-button/pomodoro-button-s.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@
112112
stop() {
113113
this.data.status = MANUAL_PAUSE;
114114
this.$interval.cancel(this.timer);
115+
116+
// unset last focused task
117+
this.Tasks.setLastCurrent(undefined);
115118
this.initSession();
116119
}
117120

0 commit comments

Comments
 (0)