mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-09-10 23:53:15 +02:00
Fixed last updated logic
This commit is contained in:
parent
3ae6a4d33e
commit
3c81f60041
@ -135,8 +135,8 @@ fun syncChaptersWithSource(db: DatabaseHelper,
|
|||||||
|
|
||||||
// Set this manga as updated since chapters were changed
|
// Set this manga as updated since chapters were changed
|
||||||
val newestChaper = db.getChapters(manga).executeAsBlocking().maxBy { it.date_fetch }
|
val newestChaper = db.getChapters(manga).executeAsBlocking().maxBy { it.date_fetch }
|
||||||
val dateFetch = newestChaper?.date_fetch ?: Date().time
|
val dateFetch = newestChaper?.date_fetch ?: manga.last_update
|
||||||
manga.last_update = if (dateFetch == 0L) Date().time else dateFetch
|
manga.last_update = dateFetch
|
||||||
db.updateLastUpdated(manga).executeAsBlocking()
|
db.updateLastUpdated(manga).executeAsBlocking()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user