show latest messages first at search results

This commit is contained in:
tibbi 2022-05-01 22:55:55 +02:00
parent 43c55e24ac
commit b8ec0a657f
2 changed files with 2 additions and 2 deletions

View File

@ -62,7 +62,7 @@ android {
}
dependencies {
implementation 'com.github.SimpleMobileTools:Simple-Commons:e3376e4f56'
implementation 'com.github.SimpleMobileTools:Simple-Commons:e8ad6a9128'
implementation 'org.greenrobot:eventbus:3.3.1'
implementation 'com.github.tibbi:IndicatorFastScroll:4524cd0b61'
implementation 'com.github.tibbi:android-smsmms:fe58a74d59'

View File

@ -110,7 +110,7 @@ class SearchActivity : SimpleActivity() {
searchResults.add(searchResult)
}
messages.forEach { message ->
messages.sortedByDescending { it.id }.forEach { message ->
var recipient = message.senderName
if (recipient.isEmpty() && message.participants.isNotEmpty()) {
val participantNames = message.participants.map { it.name }