* route subscription changed to ActivationStart to manage timing issue in navigation timer
This commit is contained in:
parent
8595919cb6
commit
47eaae25d7
@ -2,7 +2,7 @@
|
||||
<h1 class="ui dividing header">Dashboard</h1>
|
||||
|
||||
<div class="ui four cards">
|
||||
<a class="ui raised yellow card" [routerLink]="['/commit-tracker']">
|
||||
<a class="ui raised yellow card" [routerLink]="['/kanban']">
|
||||
<div class="content">
|
||||
<div class="header">Start slideshow</div>
|
||||
<div class="meta">
|
||||
|
||||
@ -4,7 +4,7 @@ import { SettingsService } from './settings.service';
|
||||
import { SelfUpdaterService } from './self-updater.service';
|
||||
import { TimerObservable } from 'rxjs/observable/TimerObservable';
|
||||
import { Subscription } from 'rxjs/Subscription';
|
||||
import { ActivationEnd, Router } from '@angular/router';
|
||||
import { ActivationStart, Router } from '@angular/router';
|
||||
import { SlideShowService } from '../../display/slide-show.service';
|
||||
import 'rxjs/add/operator/filter';
|
||||
import 'rxjs/add/operator/switchMap';
|
||||
@ -35,8 +35,8 @@ export class TimerService implements OnDestroy {
|
||||
|
||||
this.autoSwitch = false;
|
||||
this.router.events
|
||||
.filter(event => event instanceof ActivationEnd)
|
||||
.subscribe((event: ActivationEnd) => this.autoSwitch = !!event.snapshot.data.autoSwitchable);
|
||||
.filter(event => event instanceof ActivationStart)
|
||||
.subscribe((event: ActivationStart) => this.autoSwitch = !!event.snapshot.data.autoSwitchable);
|
||||
|
||||
this.slideIntervalSubscription = this.settings.slideIntervalChanged.subscribe(
|
||||
interval => this.setSlideTimer(interval)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user