clean unused value from MaterialFastScroll

This commit is contained in:
Jays2Kings 2021-07-09 22:12:19 -04:00
parent 784bd22989
commit c30b56693c
3 changed files with 0 additions and 8 deletions

View File

@ -118,8 +118,4 @@ class MaterialFastScroll @JvmOverloads constructor(context: Context, attrs: Attr
}
}
}
companion object {
const val noUpdate = "don't update scroll"
}
}

View File

@ -60,7 +60,6 @@ import eu.kanade.tachiyomi.data.preference.PreferencesHelper
import eu.kanade.tachiyomi.data.preference.getOrDefault
import eu.kanade.tachiyomi.databinding.LibraryControllerBinding
import eu.kanade.tachiyomi.source.LocalSource
import eu.kanade.tachiyomi.ui.base.MaterialFastScroll
import eu.kanade.tachiyomi.ui.base.MaterialMenuSheet
import eu.kanade.tachiyomi.ui.base.controller.BaseCoroutineController
import eu.kanade.tachiyomi.ui.category.CategoryController
@ -249,7 +248,6 @@ class LibraryController(
private var scrollListener = object : RecyclerView.OnScrollListener() {
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
super.onScrolled(recyclerView, dx, dy)
if (recyclerView.tag == MaterialFastScroll.noUpdate) return
val recyclerCover = binding.recyclerCover
if (!recyclerCover.isClickable && isAnimatingHopper != true) {
if (preferences.autohideHopper().get()) {

View File

@ -30,7 +30,6 @@ import com.bluelinelabs.conductor.RouterTransaction
import eu.kanade.tachiyomi.R
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
import eu.kanade.tachiyomi.databinding.MainActivityBinding
import eu.kanade.tachiyomi.ui.base.MaterialFastScroll
import eu.kanade.tachiyomi.ui.base.controller.OneWayFadeChangeHandler
import eu.kanade.tachiyomi.ui.main.BottomSheetController
import eu.kanade.tachiyomi.ui.main.FloatingSearchInterface
@ -359,7 +358,6 @@ fun Controller.scrollViewWith(
object : RecyclerView.OnScrollListener() {
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
super.onScrolled(recyclerView, dx, dy)
if (recyclerView.tag == MaterialFastScroll.noUpdate) return
if (router?.backstack?.lastOrNull()
?.controller == this@scrollViewWith && statusBarHeight > -1 &&
activity != null && activityBinding!!.appBar.height > 0 &&