浏览代码

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 月之前
父节点
当前提交
6ddf06e9fd
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      app/src/main/java/com/nextcloud/talk/conversationlist/ConversationsListActivity.kt

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

@@ -1011,8 +1011,10 @@ class ConversationsListActivity :
 
 
         binding.newMentionPopupBubble.hide()
         binding.newMentionPopupBubble.hide()
         binding.newMentionPopupBubble.setPopupBubbleListener {
         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) }
         binding.newMentionPopupBubble.let { viewThemeUtils.material.colorMaterialButtonPrimaryFilled(it) }