Stop active scroll when emoji category is tapped

This commit is contained in:
Ensar Sarajčić 2023-08-30 13:52:26 +02:00
parent 967485bd44
commit 0ea9f39ce2
1 changed files with 1 additions and 0 deletions

View File

@ -1580,6 +1580,7 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
it.imageTintList = ColorStateList.valueOf(inactiveColor)
}
root.imageTintList = ColorStateList.valueOf(context.getProperPrimaryColor())
keyboardViewBinding?.emojisList?.stopScroll()
(keyboardViewBinding?.emojisList?.layoutManager as? GridLayoutManager)?.scrollToPositionWithOffset(
allItems.indexOfFirst { it is EmojisAdapter.Item.Category && it.value == category },
0