Reuse getSearchName

This commit is contained in:
Andrew 2024-06-27 10:21:37 +09:30
parent 5ebde324c2
commit b775b5aca9
2 changed files with 1 additions and 4 deletions

View File

@ -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)
}

View File

@ -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