From 2b3b83a31d2f88e94ac800fef915c544e18467a4 Mon Sep 17 00:00:00 2001 From: sowjanyakch Date: Thu, 21 Nov 2024 17:49:13 +0100 Subject: [PATCH] Changes to ConversationsListActivity Signed-off-by: sowjanyakch --- .../conversationlist/ConversationsListActivity.kt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/nextcloud/talk/conversationlist/ConversationsListActivity.kt b/app/src/main/java/com/nextcloud/talk/conversationlist/ConversationsListActivity.kt index 68b0e14e1d..5174219108 100644 --- a/app/src/main/java/com/nextcloud/talk/conversationlist/ConversationsListActivity.kt +++ b/app/src/main/java/com/nextcloud/talk/conversationlist/ConversationsListActivity.kt @@ -146,6 +146,7 @@ import java.util.Objects import java.util.concurrent.TimeUnit import javax.inject.Inject +@SuppressLint("StringFormatInvalid") @AutoInjector(NextcloudTalkApplication::class) class ConversationsListActivity : BaseActivity(), @@ -1024,8 +1025,8 @@ class ConversationsListActivity : newFragment.show(supportFragmentManager, FilterConversationFragment.TAG) } - binding.newMentionPopupBubble.hide() - binding.newMentionPopupBubble.setPopupBubbleListener { + binding.newMentionPopupBubble.visibility = View.GONE + binding.newMentionPopupBubble.setOnClickListener { val layoutManager = binding.recyclerView.layoutManager as SmoothScrollLinearLayoutManager? layoutManager?.scrollToPositionWithOffset( nextUnreadConversationScrollPosition, @@ -1047,7 +1048,7 @@ class ConversationsListActivity : searchBehaviorSubject.subscribe { value -> if (value) { nextUnreadConversationScrollPosition = 0 - binding.newMentionPopupBubble.hide() + binding.newMentionPopupBubble.visibility = View.GONE } else { try { val lastVisibleItem = layoutManager!!.findLastCompletelyVisibleItemPosition() @@ -1057,13 +1058,13 @@ class ConversationsListActivity : if (hasUnreadItems(conversation) && position > lastVisibleItem) { nextUnreadConversationScrollPosition = position if (!binding.newMentionPopupBubble.isShown) { - binding.newMentionPopupBubble.show() + binding.newMentionPopupBubble.visibility = View.VISIBLE } return@subscribe } } nextUnreadConversationScrollPosition = 0 - binding.newMentionPopupBubble.hide() + binding.newMentionPopupBubble.visibility = View.GONE } catch (e: NullPointerException) { Log.d( TAG,