From b775b5aca9d5e47e4fd30baf681089cb8491c5ef Mon Sep 17 00:00:00 2001 From: Andrew Date: Thu, 27 Jun 2024 10:21:37 +0930 Subject: [PATCH] Reuse getSearchName --- .../securesms/home/search/GlobalSearchAdapterUtils.kt | 4 +--- .../thoughtcrime/securesms/preferences/SettingsActivity.kt | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/home/search/GlobalSearchAdapterUtils.kt b/app/src/main/java/org/thoughtcrime/securesms/home/search/GlobalSearchAdapterUtils.kt index 1903b13b3b..f45ffbef57 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/home/search/GlobalSearchAdapterUtils.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/home/search/GlobalSearchAdapterUtils.kt @@ -100,9 +100,7 @@ fun ContentView.bindModel(query: String?, model: GroupConversation) { val groupRecipients = model.groupRecord.members.map { Recipient.from(binding.root.context, it, false) } - val membersString = groupRecipients.joinToString { - it.name ?: truncateIdForDisplay(it.address.serialize()) - } + val membersString = groupRecipients.joinToString(transform = Recipient::getSearchName) if (model.groupRecord.isClosedGroup) { binding.searchResultSubtitle.text = getHighlight(query, membersString) } diff --git a/app/src/main/java/org/thoughtcrime/securesms/preferences/SettingsActivity.kt b/app/src/main/java/org/thoughtcrime/securesms/preferences/SettingsActivity.kt index e705cca1e0..ee76260e7b 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/preferences/SettingsActivity.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/preferences/SettingsActivity.kt @@ -18,7 +18,6 @@ import android.view.View import android.view.inputmethod.EditorInfo import android.view.inputmethod.InputMethodManager import android.widget.Toast -import androidx.annotation.RequiresApi import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row