From f038e81ff37334680c8eff344cb6f5f5406beaf6 Mon Sep 17 00:00:00 2001
From: Cody Henthorne <cody@signal.org>
Date: Tue, 19 Apr 2022 12:50:41 -0400
Subject: [PATCH] Fix long name issues in reaction and recipient bottom sheet.

Fixes #12113
---
 ...reactions_bottom_sheet_dialog_fragment_recipient_item.xml | 5 ++++-
 app/src/main/res/layout/recipient_bottom_sheet.xml           | 4 ++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/app/src/main/res/layout/reactions_bottom_sheet_dialog_fragment_recipient_item.xml b/app/src/main/res/layout/reactions_bottom_sheet_dialog_fragment_recipient_item.xml
index 8652e4d909..f1d0c195c9 100644
--- a/app/src/main/res/layout/reactions_bottom_sheet_dialog_fragment_recipient_item.xml
+++ b/app/src/main/res/layout/reactions_bottom_sheet_dialog_fragment_recipient_item.xml
@@ -24,14 +24,17 @@
         app:layout_constraintStart_toStartOf="@id/reactions_bottom_view_recipient_avatar"
         app:layout_constraintTop_toTopOf="@id/reactions_bottom_view_recipient_avatar" />
 
-    <TextView
+    <org.thoughtcrime.securesms.components.FromTextView
         android:id="@+id/reactions_bottom_view_recipient_name"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_marginStart="8dp"
+        android:ellipsize="end"
         android:gravity="center_vertical"
+        android:maxLines="2"
         android:textAppearance="@style/TextAppearance.Signal.Body1.Bold"
         android:textColor="@color/signal_text_primary"
+        app:layout_constrainedWidth="true"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintEnd_toStartOf="@id/reactions_bottom_view_recipient_emoji"
         app:layout_constraintHorizontal_bias="0.0"
diff --git a/app/src/main/res/layout/recipient_bottom_sheet.xml b/app/src/main/res/layout/recipient_bottom_sheet.xml
index ef975ff487..35a615e7f8 100644
--- a/app/src/main/res/layout/recipient_bottom_sheet.xml
+++ b/app/src/main/res/layout/recipient_bottom_sheet.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
@@ -242,4 +242,4 @@
         </LinearLayout>
 
     </androidx.constraintlayout.widget.ConstraintLayout>
-</ScrollView>
+</androidx.core.widget.NestedScrollView>
-- 
GitLab