From c438236bf79720678cd54b44b0cded0fff746a2c Mon Sep 17 00:00:00 2001 From: Jays2Kings Date: Wed, 7 Jul 2021 18:19:07 -0400 Subject: [PATCH] formatting changes in ChapterSourceSync --- .../eu/kanade/tachiyomi/util/chapter/ChapterSourceSync.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 e444eb2562..8a91697887 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 @@ -67,7 +67,9 @@ fun syncChaptersWithSource( ChapterRecognition.parseChapterNumber(sourceChapter, manga) if (shouldUpdateDbChapter(dbChapter, sourceChapter)) { - if (dbChapter.name != sourceChapter.name && downloadManager.isChapterDownloaded(dbChapter, manga)) { + if (dbChapter.name != sourceChapter.name && + downloadManager.isChapterDownloaded(dbChapter, manga) + ) { downloadManager.renameChapter(source, manga, dbChapter, sourceChapter) } dbChapter.scanlator = sourceChapter.scanlator @@ -150,7 +152,8 @@ fun syncChaptersWithSource( db.fixChaptersSourceOrder(sourceChapters).executeAsBlocking() // Set this manga as updated since chapters were changed - val newestChapterDate = db.getChapters(manga).executeAsBlocking().maxOfOrNull { it.date_upload } ?: 0L + val newestChapterDate = db.getChapters(manga).executeAsBlocking() + .maxOfOrNull { it.date_upload } ?: 0L if (newestChapterDate == 0L) { if (toAdd.isNotEmpty()) { manga.last_update = Date().time