Skip to content

Commit

Permalink
avoids opening idle timeout box while drawing
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasHermansen-Computas committed Sep 17, 2024
1 parent bcd666a commit 34c3ce3
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,11 @@ export class AppComponent implements OnInit {

//Whenever user become inactive (25sec) -> open prompt.
this.userInactive.subscribe(() => {
//Never open prompt on drawing page.
if (this.gameStateService.getCurrentPage() === GAMESTATE.drawingBoard) {
this.setDialogTimeout();
}

if (this.router.url === '/welcome') {
this.router.navigate(['/']);
} else if (this.router.url !== '/' && !this.router.url.startsWith('/admin')) {

//avoids opening idle timeout box on initial page, admin page and while drawing
} else if (this.router.url !== '/' && !this.router.url.startsWith('/admin') && this.gameStateService.getCurrentPage() !== GAMESTATE.drawingBoard) {
this.openDialog();
}
});
Expand Down

0 comments on commit 34c3ce3

Please sign in to comment.