mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-10 01:35:09 +01:00
Fixed ext bottom sheet not being able to drag in some casesq
case being: 1. open sheet 2. scroll down 3. press back (collapses sheet) 4. push new screen 5. go back
This commit is contained in:
parent
203758dddd
commit
3e7ad9dbd3
@ -7,6 +7,7 @@ import androidx.recyclerview.widget.RecyclerView
|
|||||||
import eu.davidea.flexibleadapter.FlexibleAdapter
|
import eu.davidea.flexibleadapter.FlexibleAdapter
|
||||||
import eu.davidea.flexibleadapter.items.IFlexible
|
import eu.davidea.flexibleadapter.items.IFlexible
|
||||||
import eu.kanade.tachiyomi.databinding.RecyclerWithScrollerBinding
|
import eu.kanade.tachiyomi.databinding.RecyclerWithScrollerBinding
|
||||||
|
import eu.kanade.tachiyomi.util.view.isExpanded
|
||||||
import eu.kanade.tachiyomi.util.view.updatePaddingRelative
|
import eu.kanade.tachiyomi.util.view.updatePaddingRelative
|
||||||
|
|
||||||
class RecyclerWithScrollerView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) :
|
class RecyclerWithScrollerView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) :
|
||||||
@ -28,7 +29,10 @@ class RecyclerWithScrollerView @JvmOverloads constructor(context: Context, attrs
|
|||||||
|
|
||||||
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
|
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
|
||||||
super.onScrolled(recyclerView, dx, dy)
|
super.onScrolled(recyclerView, dx, dy)
|
||||||
if (sheet.isOnView(this@RecyclerWithScrollerView) && recyclerView.canScrollVertically(-1)) {
|
if (sheet.isOnView(this@RecyclerWithScrollerView) &&
|
||||||
|
sheet.sheetBehavior.isExpanded() &&
|
||||||
|
recyclerView.canScrollVertically(-1)
|
||||||
|
) {
|
||||||
sheet.sheetBehavior?.isDraggable = false
|
sheet.sheetBehavior?.isDraggable = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user