diff --git a/app-src/scripts/constants.js b/app-src/scripts/constants.js index ffed71d9d1..58375e7761 100644 --- a/app-src/scripts/constants.js +++ b/app-src/scripts/constants.js @@ -127,6 +127,7 @@ isStopTrackingOnLongBreak: true, isShowDistractionsOnBreak: true, isPlaySound: true, + isGoToWorkView: true, }, isTakeABreakEnabled: false, takeABreakMinWorkingTime: undefined, diff --git a/app-src/scripts/pomodoro-button/pomodoro-button-s.js b/app-src/scripts/pomodoro-button/pomodoro-button-s.js index 140a62e90b..0845c93a23 100644 --- a/app-src/scripts/pomodoro-button/pomodoro-button-s.js +++ b/app-src/scripts/pomodoro-button/pomodoro-button-s.js @@ -18,12 +18,13 @@ class PomodoroButton { /* @ngInject */ - constructor($rootScope, $interval, $q, Dialogs, Tasks, SimpleToast, LS_DEFAULTS, EV, IS_ELECTRON, Notifier) { + constructor($rootScope, $interval, $q, Dialogs, Tasks, SimpleToast, LS_DEFAULTS, EV, IS_ELECTRON, Notifier, $state) { this.LS_DEFAULTS = LS_DEFAULTS; this.IS_ELECTRON = IS_ELECTRON; this.EV = EV; this.$rootScope = $rootScope; this.$interval = $interval; + this.$state = $state; this.$q = $q; this.Dialogs = Dialogs; this.SimpleToast = SimpleToast; @@ -102,6 +103,10 @@ this.selectTask() .then(() => { this.start(); + + if (this.config.isGoToWorkView) { + this.$state.go('work-view'); + } }); } diff --git a/app-src/scripts/settings/misc-settings/misc-settings-d.html b/app-src/scripts/settings/misc-settings/misc-settings-d.html index 10b8b862e8..7a9a166539 100644 --- a/app-src/scripts/settings/misc-settings/misc-settings-d.html +++ b/app-src/scripts/settings/misc-settings/misc-settings-d.html @@ -110,6 +110,12 @@ ng-model="vm.settings.pomodoro.cyclesBeforeLongerBreak"> +