From 291168f4debfc87a62c77c252c77ebeff4b3aafd Mon Sep 17 00:00:00 2001 From: arkon Date: Mon, 8 Feb 2021 17:45:42 -0500 Subject: [PATCH] Remove unnecessary LayoutContainer implementations --- .../tachiyomi/ui/base/controller/BaseController.kt | 7 +------ .../kanade/tachiyomi/ui/base/holder/BaseViewHolder.kt | 11 ----------- .../eu/kanade/tachiyomi/ui/manga/track/TrackHolder.kt | 4 ++-- .../ui/reader/viewer/webtoon/WebtoonBaseHolder.kt | 4 ++-- 4 files changed, 5 insertions(+), 21 deletions(-) delete mode 100644 app/src/main/java/eu/kanade/tachiyomi/ui/base/holder/BaseViewHolder.kt diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/base/controller/BaseController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/base/controller/BaseController.kt index c13c04448..3c520efe6 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/base/controller/BaseController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/base/controller/BaseController.kt @@ -11,15 +11,13 @@ import com.bluelinelabs.conductor.Controller import com.bluelinelabs.conductor.ControllerChangeHandler import com.bluelinelabs.conductor.ControllerChangeType import com.bluelinelabs.conductor.RestoreViewOnCreateController -import kotlinx.android.extensions.LayoutContainer import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.MainScope import kotlinx.coroutines.cancel import timber.log.Timber abstract class BaseController(bundle: Bundle? = null) : - RestoreViewOnCreateController(bundle), - LayoutContainer { + RestoreViewOnCreateController(bundle) { lateinit var binding: VB @@ -53,9 +51,6 @@ abstract class BaseController(bundle: Bundle? = null) : ) } - override val containerView: View? - get() = view - override fun onCreateView(inflater: LayoutInflater, container: ViewGroup, savedViewState: Bundle?): View { return inflateView(inflater, container) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/base/holder/BaseViewHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/base/holder/BaseViewHolder.kt deleted file mode 100644 index 63c00d5e9..000000000 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/base/holder/BaseViewHolder.kt +++ /dev/null @@ -1,11 +0,0 @@ -package eu.kanade.tachiyomi.ui.base.holder - -import android.view.View -import androidx.recyclerview.widget.RecyclerView -import kotlinx.android.extensions.LayoutContainer - -abstract class BaseViewHolder(view: View) : RecyclerView.ViewHolder(view), LayoutContainer { - - override val containerView: View? - get() = itemView -} diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackHolder.kt index 1279335aa..012ab95e1 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/track/TrackHolder.kt @@ -2,13 +2,13 @@ package eu.kanade.tachiyomi.ui.manga.track import android.annotation.SuppressLint import androidx.core.view.isVisible +import androidx.recyclerview.widget.RecyclerView import eu.kanade.tachiyomi.data.preference.PreferencesHelper import eu.kanade.tachiyomi.databinding.TrackItemBinding -import eu.kanade.tachiyomi.ui.base.holder.BaseViewHolder import uy.kohesive.injekt.injectLazy import java.text.DateFormat -class TrackHolder(private val binding: TrackItemBinding, adapter: TrackAdapter) : BaseViewHolder(binding.root) { +class TrackHolder(private val binding: TrackItemBinding, adapter: TrackAdapter) : RecyclerView.ViewHolder(binding.root) { private val preferences: PreferencesHelper by injectLazy() diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonBaseHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonBaseHolder.kt index 10a01b137..eff894517 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonBaseHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonBaseHolder.kt @@ -3,13 +3,13 @@ package eu.kanade.tachiyomi.ui.reader.viewer.webtoon import android.content.Context import android.view.View import android.view.ViewGroup.LayoutParams -import eu.kanade.tachiyomi.ui.base.holder.BaseViewHolder +import androidx.recyclerview.widget.RecyclerView import rx.Subscription abstract class WebtoonBaseHolder( view: View, protected val viewer: WebtoonViewer -) : BaseViewHolder(view) { +) : RecyclerView.ViewHolder(view) { /** * Context getter because it's used often.