Commit 9520edf5 authored by Curtis Adam's avatar Curtis Adam

Attempt to autostart the pomodoro timer in presentation mode

parent e984178e
......@@ -102,7 +102,11 @@ export let Route = class Route {
* @return {Boolean} Return true, when route is a presentation view.
*/
static isPresentation () {
return (Router.current().route.getName() === "presentation" || this.isPresentationList() || this.isPresentationTranscript());
return (this.isDefaultPresentation() || this.isPresentationList() || this.isPresentationTranscript());
}
static isDefaultPresentation () {
return Router.current().route.getName() === "presentation";
}
static isPresentationList () {
......
......@@ -68,8 +68,14 @@ Template.pomodoroTimerModal.onRendered(function () {
if (Bonus.isInBonus(Router.current().params._id)) {
PomodoroTimer.start();
} else {
if (!PomodoroTimer.isPomodoroRunning() && !Route.isPresentationViewList()) {
$('#pomodoroTimerModal').modal('show');
if (!PomodoroTimer.isPomodoroRunning()) {
if (Route.isDefaultPresentation() || Route.isPresentationList()) {
PomodoroTimer.initializeVariables();
PomodoroTimer.initializeModalContent();
PomodoroTimer.start();
} else {
$('#pomodoroTimerModal').modal('show');
}
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment