From 75c19b2dc21ddc3338a9d7ea590bb3e0e999610f Mon Sep 17 00:00:00 2001 From: Roland Crosby Date: Sun, 11 Aug 2024 19:12:36 -0400 Subject: [PATCH] Show handle in recent searches and fix truncation (#4917) Co-authored-by: Hailey --- src/view/screens/Search/Search.tsx | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/view/screens/Search/Search.tsx b/src/view/screens/Search/Search.tsx index 737e4c5c..30d16506 100644 --- a/src/view/screens/Search/Search.tsx +++ b/src/view/screens/Search/Search.tsx @@ -894,13 +894,6 @@ let AutocompleteResults = ({ } AutocompleteResults = React.memo(AutocompleteResults) -function truncateText(text: string, maxLength: number) { - if (text.length > maxLength) { - return text.substring(0, maxLength) + '...' - } - return text -} - function SearchHistory({ searchHistory, selectedProfiles, @@ -965,8 +958,10 @@ function SearchHistory({ style={styles.profileAvatar as StyleProp} accessibilityIgnoresInvertColors /> - - {truncateText(profile.displayName || '', 12)} + + {profile.displayName || profile.handle}