1
0
Fork 0
mirror of https://github.com/anyproto/anytype-kotlin.git synced 2025-06-08 05:47:05 +09:00

Editor | Fix | ActionToolBar, scroll (#2220)

Co-authored-by: konstantiniiv <ki@anytype.io>
This commit is contained in:
Konstantin Ivanov 2022-05-02 17:57:07 +03:00 committed by GitHub
parent a9794e3319
commit a25c4ff06d
Signed by: github
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -1345,6 +1345,7 @@ open class EditorFragment : NavigationFragment<FragmentEditorBinding>(R.layout.f
behavior.removeBottomSheetCallback(onHideBottomSheetCallback)
}
}
binding.blockActionToolbar.scrollToPosition(0)
} else {
binding.recycler.apply { itemAnimator = null }
behavior.apply {

View file

@ -44,7 +44,10 @@ class BlockActionWidget @JvmOverloads constructor(
fun bind(actions: List<ActionItemType>) {
blockActionAdapter.submitList(actions)
binding.blockActionRecycler.smoothScrollToPosition(0)
}
fun scrollToPosition(pos: Int) {
binding.blockActionRecycler.scrollToPosition(pos)
}
class Adapter(