Library View: Add latest chapter sorting and revert last updated sorting changes (#2563)
* Library View: Add latest chapter sorting and revert last updated sorting changes Latest chapter is as it sounds Last update is now any changes to the chapter list (addition, removal, rename, etc.) * Change latest chapter sort string to "Latest chapter" instead of "Last chapter"
This commit is contained in:
@@ -129,9 +129,8 @@ fun syncChaptersWithSource(db: DatabaseHelper,
|
||||
// Fix order in source.
|
||||
db.fixChaptersSourceOrder(sourceChapters).executeAsBlocking()
|
||||
|
||||
// Set manga's last update time to latest chapter's upload time if possible
|
||||
val newestChapter = db.getChapters(manga).executeAsBlocking().maxBy { it.date_upload }
|
||||
manga.last_update = newestChapter?.date_upload ?: manga.last_update
|
||||
// Set this manga as updated since chapters were changed
|
||||
manga.last_update = Date().time
|
||||
db.updateLastUpdated(manga).executeAsBlocking()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user