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:
Joseph Milazzo 2022-01-08 16:17:04 -08:00 committed by GitHub
parent 194fe8318c
commit a2364285b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 4 deletions

View File

@ -40,7 +40,7 @@ namespace API.DTOs
/// </summary> /// </summary>
public int ReleaseYear { get; set; } public int ReleaseYear { get; set; }
/// <summary> /// <summary>
/// Language of the content (ISO 639-1 code) /// Language of the content (BCP-47 code)
/// </summary> /// </summary>
public string Language { get; set; } = string.Empty; public string Language { get; set; } = string.Empty;
/// <summary> /// <summary>

View File

@ -32,7 +32,7 @@ namespace API.Entities.Metadata
/// </summary> /// </summary>
public int ReleaseYear { get; set; } public int ReleaseYear { get; set; }
/// <summary> /// <summary>
/// Language of the content (ISO 639-1 code) /// Language of the content (BCP-47 code)
/// </summary> /// </summary>
public string Language { get; set; } = string.Empty; public string Language { get; set; } = string.Empty;
/// <summary> /// <summary>

View File

@ -752,7 +752,7 @@ export class BookReaderComponent implements OnInit, AfterViewInit, OnDestroy {
setPageNum(pageNum: number) { setPageNum(pageNum: number) {
if (pageNum < 0) { if (pageNum < 0) {
this.pageNum = 0; this.pageNum = 0;
} else if (pageNum >= this.maxPages - 1) { } else if (pageNum >= this.maxPages) {
this.pageNum = this.maxPages - 1; this.pageNum = this.maxPages - 1;
} else { } else {
this.pageNum = pageNum; this.pageNum = pageNum;
@ -812,13 +812,14 @@ export class BookReaderComponent implements OnInit, AfterViewInit, OnDestroy {
this.setPageNum(this.pageNum - 1); this.setPageNum(this.pageNum - 1);
} }
if (this.pageNum === this.maxPages - 1) { if (oldPageNum + 1 === this.maxPages) {
// Move to next volume/chapter automatically // Move to next volume/chapter automatically
this.loadNextChapter(); this.loadNextChapter();
} }
if (oldPageNum === this.pageNum) { return; } if (oldPageNum === this.pageNum) { return; }
this.loadPage(); this.loadPage();
} }