Book Reader Issue Take 2 (#916)
* Implemented Publication Status in SeriesMetadata and the ability to filter it. * Updated the docs for Language on metadata to specify it's a BCP-47 code to match Anansi Project. Fixed a bug with reader from previous PR.
This commit is contained in:
parent
194fe8318c
commit
a2364285b0
3 changed files with 5 additions and 4 deletions
|
@ -752,7 +752,7 @@ export class BookReaderComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
setPageNum(pageNum: number) {
|
||||
if (pageNum < 0) {
|
||||
this.pageNum = 0;
|
||||
} else if (pageNum >= this.maxPages - 1) {
|
||||
} else if (pageNum >= this.maxPages) {
|
||||
this.pageNum = this.maxPages - 1;
|
||||
} else {
|
||||
this.pageNum = pageNum;
|
||||
|
@ -812,13 +812,14 @@ export class BookReaderComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
this.setPageNum(this.pageNum - 1);
|
||||
}
|
||||
|
||||
if (this.pageNum === this.maxPages - 1) {
|
||||
if (oldPageNum + 1 === this.maxPages) {
|
||||
// Move to next volume/chapter automatically
|
||||
this.loadNextChapter();
|
||||
}
|
||||
|
||||
if (oldPageNum === this.pageNum) { return; }
|
||||
|
||||
|
||||
this.loadPage();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue