fix(library): Sort by latest chapter is not working properly

`last_update` is now when entry chapter list is changed instead of when is
the latest entry uploaded. It is now replaced by LibraryManga's
latestUpdate

Fixes GH-309
This commit is contained in:
Ahmad Ansori Palembani 2024-12-18 11:22:23 +07:00
parent 6c40fe92be
commit b3e69bdb28
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6
2 changed files with 6 additions and 2 deletions

View file

@ -9,10 +9,14 @@ The format is simplified version of [Keep a Changelog](https://keepachangelog.co
- `Translation` - Translation changes/updates
- `Other` - Technical changes/updates
## [Unreleased]
### Fixes
- Fix sorting by latest chapter is not working properly
## [1.9.6]
### Fixes
- Fix weird flickering when browsing sources
- Fix some crashes
## [1.9.5]

View file

@ -658,7 +658,7 @@ class LibraryPresenter(
category.mangaSort != null -> {
var sort = when (category.sortingMode() ?: LibrarySort.Title) {
LibrarySort.Title -> sortAlphabetical(i1, i2)
LibrarySort.LatestChapter -> i2.manga.last_update.compareTo(i1.manga.last_update)
LibrarySort.LatestChapter -> i2.manga.latestUpdate.compareTo(i1.manga.latestUpdate)
LibrarySort.Unread -> when {
i1.manga.unread == i2.manga.unread -> 0
i1.manga.unread == 0 -> if (category.isAscending()) 1 else -1