Преглед на файлове

fix to show all participants in conversation info

In general it's a bad idea to use recyclerview inside scrollviews because of poor performance! So this is only a fix until everything is replaced with jetpack compose.

setHasFixedSize and isNestedScrollingEnabled were set to false. This might not be necessary for the current implementation, but it's recommended when using NestedScrollView.

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Marcel Hibbe преди 11 месеца
родител
ревизия
32f4b59161

+ 1 - 1
app/src/main/java/com/nextcloud/talk/conversationinfo/ConversationInfoActivity.kt

@@ -495,7 +495,7 @@ class ConversationInfoActivity :
 
         val layoutManager = SmoothScrollLinearLayoutManager(this)
         binding.recyclerView.layoutManager = layoutManager
-        binding.recyclerView.setHasFixedSize(true)
+        binding.recyclerView.setHasFixedSize(false)
         binding.recyclerView.adapter = adapter
         binding.recyclerView.isNestedScrollingEnabled = false
         adapter!!.addListener(this)

+ 2 - 2
app/src/main/res/layout/activity_conversation_info.xml

@@ -49,7 +49,7 @@
         android:indeterminateTintMode="src_in"
         tools:visibility="gone" />
 
-    <ScrollView
+    <androidx.core.widget.NestedScrollView
         android:layout_width="match_parent"
         android:layout_height="wrap_content">
 
@@ -413,5 +413,5 @@
                 </LinearLayout>
             </LinearLayout>
         </LinearLayout>
-    </ScrollView>
+    </androidx.core.widget.NestedScrollView>
 </LinearLayout>