From 440b624903b874e25ea254966a7ac8a2a25cdbbc Mon Sep 17 00:00:00 2001 From: KaiserBh Date: Fri, 29 Dec 2023 02:06:43 +1100 Subject: [PATCH] refactor: Ktlint and replace enum.values with Enum.entries. Signed-off-by: KaiserBh --- .../main/java/eu/kanade/tachiyomi/data/sync/SyncManager.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/sync/SyncManager.kt b/app/src/main/java/eu/kanade/tachiyomi/data/sync/SyncManager.kt index 414218cc7..5ab0b21fa 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/sync/SyncManager.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/sync/SyncManager.kt @@ -22,7 +22,6 @@ import tachiyomi.data.Chapters import tachiyomi.data.DatabaseHandler import tachiyomi.data.manga.MangaMapper.mapManga import tachiyomi.domain.category.interactor.GetCategories -import tachiyomi.domain.chapter.model.Chapter import tachiyomi.domain.manga.interactor.GetFavorites import tachiyomi.domain.manga.model.Manga import tachiyomi.domain.sync.SyncPreferences @@ -61,7 +60,7 @@ class SyncManager( ; companion object { - fun fromInt(value: Int) = values().firstOrNull { it.value == value } ?: NONE + fun fromInt(value: Int) = entries.firstOrNull { it.value == value } ?: NONE } } @@ -190,7 +189,9 @@ class SyncManager( val localChapters = handler.await { chaptersQueries.getChaptersByMangaId(localManga.id, 0).executeAsList() } val localCategories = getCategories.await(localManga.id).map { it.order } - return localManga != remoteManga || areChaptersDifferent(localChapters, backupManga.chapters) || localCategories != backupManga.categories + return localManga != remoteManga || + areChaptersDifferent(localChapters, backupManga.chapters) || + localCategories != backupManga.categories } /**