From 473a4fec709fd7b91c024286d33ac198d90ad9c2 Mon Sep 17 00:00:00 2001 From: arkon Date: Fri, 8 Jul 2022 09:11:28 -0400 Subject: [PATCH] Fix cherry pick errors --- app/src/main/java/eu/kanade/tachiyomi/source/LocalSource.kt | 4 ---- .../kanade/tachiyomi/ui/base/controller/DialogController.kt | 2 +- .../tachiyomi/ui/browse/migration/search/SearchController.kt | 2 +- .../tachiyomi/ui/setting/database/ClearDatabaseController.kt | 2 +- .../eu/kanade/tachiyomi/util/chapter/ChapterSourceSync.kt | 2 +- 5 files changed, 4 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/source/LocalSource.kt b/app/src/main/java/eu/kanade/tachiyomi/source/LocalSource.kt index a4ecd52d6..a03e8d6fa 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/source/LocalSource.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/source/LocalSource.kt @@ -1,7 +1,6 @@ package eu.kanade.tachiyomi.source import android.content.Context -import androidx.core.net.toUri import com.github.junrar.Archive import com.hippo.unifile.UniFile import eu.kanade.tachiyomi.R @@ -20,7 +19,6 @@ import eu.kanade.tachiyomi.util.lang.compareToCaseInsensitiveNaturalOrder import eu.kanade.tachiyomi.util.storage.DiskUtil import eu.kanade.tachiyomi.util.storage.EpubFile import eu.kanade.tachiyomi.util.system.ImageUtil -import eu.kanade.tachiyomi.util.system.logcat import kotlinx.coroutines.runBlocking import kotlinx.serialization.json.Json import kotlinx.serialization.json.JsonObject @@ -29,7 +27,6 @@ import kotlinx.serialization.json.decodeFromStream import kotlinx.serialization.json.intOrNull import kotlinx.serialization.json.jsonArray import kotlinx.serialization.json.jsonPrimitive -import logcat.LogPriority import rx.Observable import tachiyomi.source.model.ChapterInfo import tachiyomi.source.model.MangaInfo @@ -359,7 +356,6 @@ class LocalSource( var coverFile = getCoverFile(manga.url, baseDirsFiles) if (coverFile == null) { coverFile = File(mangaDir.absolutePath, DEFAULT_COVER_NAME) - } // It might not exist at this point diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/base/controller/DialogController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/base/controller/DialogController.kt index 847f97214..63f63e1d0 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/base/controller/DialogController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/base/controller/DialogController.kt @@ -97,7 +97,7 @@ abstract class DialogController : Controller { /** * Dismiss the dialog and pop this controller */ - private fun dismissDialog() { + fun dismissDialog() { if (dismissed) { return } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/search/SearchController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/search/SearchController.kt index da481b72a..1e529cb79 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/search/SearchController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/search/SearchController.kt @@ -131,7 +131,7 @@ class SearchController( } .setNeutralButton(activity?.getString(R.string.action_show_manga)) { _, _ -> dismissDialog() - router.pushController(MangaController(newManga)) + router.pushController(MangaController(newManga).withFadeTransaction()) } .create() } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/database/ClearDatabaseController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/database/ClearDatabaseController.kt index a47075667..e5910d29d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/database/ClearDatabaseController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/database/ClearDatabaseController.kt @@ -66,7 +66,7 @@ class ClearDatabaseController : adapter = FlexibleAdapter(null, this, true) binding.recycler.adapter = adapter - binding.recycler.layoutManager = LinearLayoutManager(activity) + binding.recycler.layoutManager = LinearLayoutManager(activity!!) binding.recycler.setHasFixedSize(true) adapter?.fastScroller = binding.fastScroller recycler = binding.recycler 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 2efeeb295..519b4574a 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 @@ -26,7 +26,7 @@ fun syncChaptersWithSource( db: DatabaseHelper, rawSourceChapters: List, manga: Manga, - source: Source + source: Source, ): Pair, List> { if (rawSourceChapters.isEmpty()) { throw NoChaptersException()