checked when 'canMarkPagesAsViewed' value is changing on fileChanged$ subscription called handlePageRead when that is happening
This commit is contained in:
parent
e27752c4a6
commit
ffd2aef78e
@ -47,7 +47,10 @@ export class PageIndicatorComponent implements OnChanges, OnInit, OnDestroy {
|
|||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this._subscription = this._appStateService.fileChanged$.subscribe(() => {
|
this._subscription = this._appStateService.fileChanged$.subscribe(() => {
|
||||||
this.canMarkPagesAsViewed = this._permissionService.canMarkPagesAsViewed();
|
if (this.canMarkPagesAsViewed !== this._permissionService.canMarkPagesAsViewed()) {
|
||||||
|
this.canMarkPagesAsViewed = this._permissionService.canMarkPagesAsViewed();
|
||||||
|
this._handlePageRead();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user