fix flickering of unread mention bubble

bug was introduced with https://github.com/nextcloud/talk-android/pull/3417

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
Marcel Hibbe 2024-09-09 15:43:57 +02:00 committed by sowjanyakch
parent e7d6dfd060
commit 270d76554f
No known key found for this signature in database
GPG Key ID: F7AA2A8B65B50220

View File

@ -1009,13 +1009,13 @@ class ConversationsListActivity :
newFragment.show(supportFragmentManager, FilterConversationFragment.TAG)
}
binding.newMentionPopupBubble?.hide()
binding.newMentionPopupBubble?.setPopupBubbleListener {
binding.recyclerView?.smoothScrollToPosition(
binding.newMentionPopupBubble.hide()
binding.newMentionPopupBubble.setPopupBubbleListener {
binding.recyclerView.smoothScrollToPosition(
nextUnreadConversationScrollPosition
)
}
binding.newMentionPopupBubble?.let { viewThemeUtils.material.colorMaterialButtonPrimaryFilled(it) }
binding.newMentionPopupBubble.let { viewThemeUtils.material.colorMaterialButtonPrimaryFilled(it) }
}
private fun hideLogoForBrandedClients() {
@ -1039,14 +1039,14 @@ class ConversationsListActivity :
val position = adapter!!.getGlobalPositionOf(flexItem)
if (hasUnreadItems(conversation) && position > lastVisibleItem) {
nextUnreadConversationScrollPosition = position
if (!binding.newMentionPopupBubble?.isShown!!) {
binding.newMentionPopupBubble?.show()
if (!binding.newMentionPopupBubble.isShown) {
binding.newMentionPopupBubble.show()
}
return@subscribe
}
nextUnreadConversationScrollPosition = 0
binding.newMentionPopupBubble?.hide()
}
nextUnreadConversationScrollPosition = 0
binding.newMentionPopupBubble.hide()
} catch (e: NullPointerException) {
Log.d(
TAG,