mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
chore(chapter): No longer set last_update as newest chapter's
date_upload Grab this info from SQL instead
This commit is contained in:
parent
b3e69bdb28
commit
02296985d6
1 changed files with 3 additions and 6 deletions
|
@ -118,12 +118,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) {
|
||||
manga.last_update = newestDate
|
||||
val update = MangaUpdate(manga.id!!, lastUpdate = newestDate)
|
||||
updateManga.await(update)
|
||||
}
|
||||
// TODO: Predict when the next chapter gonna release
|
||||
return Pair(emptyList(), emptyList())
|
||||
}
|
||||
|
||||
|
@ -189,6 +184,8 @@ suspend fun syncChaptersWithSource(
|
|||
}
|
||||
}
|
||||
|
||||
// TODO: Predict when the next chapter gonna release
|
||||
|
||||
// Set this manga as updated since chapters were changed
|
||||
// Note that last_update actually represents last time the chapter list changed at all
|
||||
// Those changes already checked beforehand, so we can proceed to updating the manga
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue