revert: "chore: Partial revert"

This reverts commit abcf06b921.
This commit is contained in:
Ahmad Ansori Palembani 2024-12-14 20:05:55 +07:00
parent 93e5effaaf
commit 59a8bfc7aa
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6

View file

@ -113,7 +113,7 @@ suspend fun syncChaptersWithSource(
// Return if there's nothing to add, delete or change, avoid unnecessary db transactions.
if (toAdd.isEmpty() && toDelete.isEmpty() && toChange.isEmpty()) {
val newestDate = dbChapters.maxOfOrNull { it.date_upload } ?: 0L
if (newestDate != 0L && newestDate != manga.last_update) {
if (newestDate != 0L && newestDate > manga.last_update) {
manga.last_update = newestDate
val update = MangaUpdate(manga.id!!, lastUpdate = newestDate)
updateManga.await(update)