mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-23 01:45:52 +03:00
Adds clearing to directParentNames
This commit is contained in:
parent
b437996208
commit
e003bc973a
2 changed files with 2 additions and 1 deletions
|
@ -224,6 +224,7 @@ internal class RoomSummaryUpdater @Inject constructor(
|
|||
.sort(RoomSummaryEntityFields.ROOM_ID)
|
||||
.findAll().map {
|
||||
it.flattenParentIds = null
|
||||
it.directParentNames.clear()
|
||||
it to emptyList<RoomSummaryEntity>().toMutableSet()
|
||||
}
|
||||
.toMap()
|
||||
|
|
|
@ -207,7 +207,7 @@ class RoomSummaryItemFactory @Inject constructor(
|
|||
|
||||
private fun getSearchResultSubtitle(roomSummary: RoomSummary): String {
|
||||
val userId = roomSummary.directUserId
|
||||
val directParent = roomSummary.directParentNames.lastOrNull()
|
||||
val directParent = roomSummary.directParentNames.takeIf { it.isNotEmpty() }?.joinToString()
|
||||
val canonicalAlias = roomSummary.canonicalAlias
|
||||
|
||||
return (userId ?: directParent ?: canonicalAlias).orEmpty()
|
||||
|
|
Loading…
Reference in a new issue