From fee697f148732adcac00a5c7b9b9db990b56da9f Mon Sep 17 00:00:00 2001 From: Jay Date: Sat, 8 Feb 2020 04:41:24 -0800 Subject: [PATCH] Set now as last updated for manga if the source does not provide a date for new chapters --- .../eu/kanade/tachiyomi/util/chapter/ChapterSourceSync.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/util/chapter/ChapterSourceSync.kt b/app/src/main/java/eu/kanade/tachiyomi/util/chapter/ChapterSourceSync.kt index dc1e184737..3f88cc7160 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/util/chapter/ChapterSourceSync.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/util/chapter/ChapterSourceSync.kt @@ -136,7 +136,11 @@ fun syncChaptersWithSource(db: DatabaseHelper, // Set this manga as updated since chapters were changed val newestChatper = db.getChapters(manga).executeAsBlocking().maxBy { it.date_upload } val dateFetch = newestChatper?.date_upload ?: manga.last_update - manga.last_update = dateFetch + if (dateFetch == 0L) { + if (toAdd.isNotEmpty()) + manga.last_update = Date().time + } + else manga.last_update = dateFetch db.updateLastUpdated(manga).executeAsBlocking() }