Эх сурвалжийг харах

improve to align unread conversation after tapping on unread mentions button

...instead to just show it on top

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Marcel Hibbe 9 сар өмнө
parent
commit
6ddf06e9fd

+ 4 - 2
app/src/main/java/com/nextcloud/talk/conversationlist/ConversationsListActivity.kt

@@ -1011,8 +1011,10 @@ class ConversationsListActivity :
 
         binding.newMentionPopupBubble.hide()
         binding.newMentionPopupBubble.setPopupBubbleListener {
-            binding.recyclerView.smoothScrollToPosition(
-                nextUnreadConversationScrollPosition
+            val layoutManager = binding.recyclerView.layoutManager as SmoothScrollLinearLayoutManager?
+            layoutManager?.scrollToPositionWithOffset(
+                nextUnreadConversationScrollPosition,
+                binding.recyclerView.height / 3
             )
         }
         binding.newMentionPopupBubble.let { viewThemeUtils.material.colorMaterialButtonPrimaryFilled(it) }