Reader Polish (#2465)

Co-authored-by: Andre Smith <Hobogrammer@users.noreply.github.com>
This commit is contained in:
Joe Milazzo 2023-11-30 08:40:02 -06:00 committed by GitHub
parent 9fdaf5f99f
commit e489d2404a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 156 additions and 120 deletions

View file

@ -398,7 +398,7 @@ public class ReaderService : IReaderService
// Handle Chapters within next Volume
// ! When selecting the chapter for the next volume, we need to make sure a c0 comes before a c1+
var chapters = volume.Chapters.OrderBy(x => x.Number.AsDouble(), _chapterSortComparer).ToList();
if (currentChapter.Number.Equals(Parser.DefaultChapter) && chapters.Last().Number.Equals(Parser.DefaultChapter))
if (currentChapter.Number.Equals(Parser.DefaultChapter) && chapters[^1].Number.Equals(Parser.DefaultChapter))
{
// We need to handle an extra check if the current chapter is the last special, as we should return -1
if (currentChapter.IsSpecial) return -1;