From dcb6bfb18dca482e0ae8aa4a8d3aea87fb66c7fe Mon Sep 17 00:00:00 2001 From: arkon Date: Thu, 31 Dec 2020 16:41:09 -0500 Subject: [PATCH] Remove some unused variables --- .../tachiyomi/ui/browse/extension/ExtensionAdapter.kt | 6 +----- .../tachiyomi/ui/browse/migration/sources/SourceAdapter.kt | 6 +----- .../eu/kanade/tachiyomi/ui/browse/source/SourceAdapter.kt | 6 +----- .../eu/kanade/tachiyomi/ui/manga/chapter/ChaptersAdapter.kt | 2 +- 4 files changed, 4 insertions(+), 16 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/ExtensionAdapter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/ExtensionAdapter.kt index 5a2b3c1d3..9d08e90d6 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/ExtensionAdapter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/ExtensionAdapter.kt @@ -2,19 +2,15 @@ package eu.kanade.tachiyomi.ui.browse.extension import eu.davidea.flexibleadapter.FlexibleAdapter import eu.davidea.flexibleadapter.items.IFlexible -import eu.kanade.tachiyomi.R -import eu.kanade.tachiyomi.util.system.getResourceColor /** * Adapter that holds the catalogue cards. * * @param controller instance of [ExtensionController]. */ -class ExtensionAdapter(val controller: ExtensionController) : +class ExtensionAdapter(controller: ExtensionController) : FlexibleAdapter>(null, controller, true) { - val cardBackground = controller.activity!!.getResourceColor(R.attr.colorSurface) - init { setDisplayHeadersAtStartUp(true) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/sources/SourceAdapter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/sources/SourceAdapter.kt index daba29192..ca6dd6307 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/sources/SourceAdapter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/sources/SourceAdapter.kt @@ -3,19 +3,15 @@ package eu.kanade.tachiyomi.ui.browse.migration.sources import com.bluelinelabs.conductor.Controller import eu.davidea.flexibleadapter.FlexibleAdapter import eu.davidea.flexibleadapter.items.IFlexible -import eu.kanade.tachiyomi.R -import eu.kanade.tachiyomi.util.system.getResourceColor /** * Adapter that holds the catalogue cards. * * @param controller instance of [MigrationController]. */ -class SourceAdapter(val controller: Controller) : +class SourceAdapter(controller: Controller) : FlexibleAdapter>(null, controller, true) { - val cardBackground = controller.activity!!.getResourceColor(R.attr.colorSurface) - init { setDisplayHeadersAtStartUp(true) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourceAdapter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourceAdapter.kt index 8c8ab7a6a..66d3e7572 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourceAdapter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourceAdapter.kt @@ -2,19 +2,15 @@ package eu.kanade.tachiyomi.ui.browse.source import eu.davidea.flexibleadapter.FlexibleAdapter import eu.davidea.flexibleadapter.items.IFlexible -import eu.kanade.tachiyomi.R -import eu.kanade.tachiyomi.util.system.getResourceColor /** * Adapter that holds the catalogue cards. * * @param controller instance of [SourceController]. */ -class SourceAdapter(val controller: SourceController) : +class SourceAdapter(controller: SourceController) : FlexibleAdapter>(null, controller, true) { - val cardBackground = controller.activity!!.getResourceColor(R.attr.colorSurface) - init { setDisplayHeadersAtStartUp(true) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersAdapter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersAdapter.kt index 7861e9208..4cc04d590 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersAdapter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersAdapter.kt @@ -16,7 +16,7 @@ class ChaptersAdapter( context: Context ) : FlexibleAdapter(null, controller, true) { - val preferences: PreferencesHelper by injectLazy() + private val preferences: PreferencesHelper by injectLazy() var items: List = emptyList()