Added a bug marker to ebook reader, made an optimization to continue-point api, Fixed a bulk selection bug where storyline tab wasn't properly selecting. (#997)

This commit is contained in:
Joseph Milazzo 2022-01-27 06:55:35 -08:00 committed by GitHub
parent a15314c553
commit 415832d9e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 3 deletions

View File

@ -317,6 +317,8 @@ public class ReaderService : IReaderService
.OrderBy(c => float.Parse(c.Number))
.ToList();
var currentlyReadingChapter = nonSpecialChapters.FirstOrDefault(chapter => chapter.PagesRead < chapter.Pages);
@ -330,8 +332,7 @@ public class ReaderService : IReaderService
{
if (chapter.PagesRead < chapter.Pages)
{
currentlyReadingChapter = chapter;
break;
return chapter;
}
}
}

View File

@ -663,10 +663,17 @@ export class BookReaderComponent implements OnInit, AfterViewInit, OnDestroy {
page = 0;
}
// BUG: Last page is not counting as read
if (!(page === 0 || page === this.maxPages - 1)) {
page -= 1;
}
// // Due to the fact that we start at image 0, but page 1, we need the last page to have progress as page + 1 to be completed
// let tempPageNum = this.pageNum;
// if (this.pageNum == this.maxPages - 1) {
// tempPageNum = this.pageNum + 1;
// }
this.pageNum = page;
this.loadPage();

View File

@ -87,7 +87,7 @@
<div *ngFor="let chapter of storyChapters; let idx = index; trackBy: trackByChapterIdentity">
<app-card-item class="col-auto" *ngIf="!chapter.isSpecial" [entity]="chapter" [title]="formatChapterTitle(chapter)" (click)="openChapter(chapter)"
[imageUrl]="imageService.getChapterCoverImage(chapter.id) + '&offset=' + coverImageOffset"
[read]="chapter.pagesRead" [total]="chapter.pages" [actions]="chapterActions" (selection)="bulkSelectionService.handleCardSelection('chapter', idx, chapters.length, $event)" [selected]="bulkSelectionService.isCardSelected('chapter', idx)" [allowSelection]="true"></app-card-item>
[read]="chapter.pagesRead" [total]="chapter.pages" [actions]="chapterActions" (selection)="bulkSelectionService.handleCardSelection('chapter', idx, storyChapters.length, $event)" [selected]="bulkSelectionService.isCardSelected('chapter', idx)" [allowSelection]="true"></app-card-item>
</div>
</div>
</ng-template>