mirror of
https://github.com/nextcloud/talk-android
synced 2025-03-06 14:27:24 +00:00
correct tab listerner initialization
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
660c3401f2
commit
2068faa80e
@ -100,6 +100,16 @@ class ShowReactionsDialog(
|
||||
binding.emojiReactionsTabs.addTab(tab)
|
||||
}
|
||||
|
||||
val tab: TabLayout.Tab = binding.emojiReactionsTabs.newTab() // Create a new Tab names "First Tab"
|
||||
|
||||
val itemBinding = ItemReactionsTabBinding.inflate(layoutInflater)
|
||||
itemBinding.reactionTab.tag = TAG_ALL
|
||||
itemBinding.reactionIcon.text = context.getString(R.string.reactions_tab_all)
|
||||
itemBinding.reactionCount.text = reactionsTotal.toString()
|
||||
tab.customView = itemBinding.root
|
||||
|
||||
binding.emojiReactionsTabs.addTab(tab, 0)
|
||||
|
||||
binding.emojiReactionsTabs.getTabAt(0)?.select()
|
||||
|
||||
binding.emojiReactionsTabs.addOnTabSelectedListener(object : OnTabSelectedListener {
|
||||
@ -117,16 +127,6 @@ class ShowReactionsDialog(
|
||||
}
|
||||
})
|
||||
|
||||
val tab: TabLayout.Tab = binding.emojiReactionsTabs.newTab() // Create a new Tab names "First Tab"
|
||||
|
||||
val itemBinding = ItemReactionsTabBinding.inflate(layoutInflater)
|
||||
itemBinding.reactionTab.tag = TAG_ALL
|
||||
itemBinding.reactionIcon.text = context.getString(R.string.reactions_tab_all)
|
||||
itemBinding.reactionCount.text = reactionsTotal.toString()
|
||||
tab.customView = itemBinding.root
|
||||
|
||||
binding.emojiReactionsTabs.addTab(tab, 0)
|
||||
|
||||
updateParticipantsForEmoji(chatMessage, TAG_ALL)
|
||||
}
|
||||
adapter?.notifyDataSetChanged()
|
||||
|
Loading…
Reference in New Issue
Block a user