mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2025-01-09 15:19:23 +01:00
Fix bad indexes in MaterialMenuSheet
This commit is contained in:
parent
b39225cac5
commit
1858d70f97
@ -83,12 +83,13 @@ class MaterialMenuSheet(
|
|||||||
binding.toolbarTitle.text = title
|
binding.toolbarTitle.text = title
|
||||||
|
|
||||||
if (selectedId != null) {
|
if (selectedId != null) {
|
||||||
itemAdapter.getAdapterItem(selectedId).isSelected = true
|
val pos = itemAdapter.getAdapterPosition(selectedId.toLong())
|
||||||
|
itemAdapter.getAdapterItem(pos).isSelected = true
|
||||||
binding.root.post {
|
binding.root.post {
|
||||||
binding.root.post {
|
binding.root.post {
|
||||||
binding.menuSheetRecycler.scrollBy(
|
binding.menuSheetRecycler.scrollBy(
|
||||||
0,
|
0,
|
||||||
selectedId * 48.dpToPx - binding.menuSheetRecycler.height / 2
|
pos * 48.dpToPx - binding.menuSheetRecycler.height / 2
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user