chore: Partial revert

This commit is contained in:
Ahmad Ansori Palembani 2024-12-14 19:20:23 +07:00
parent e604c951ed
commit abcf06b921
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)