Fix room name of DM in room creation item

This commit is contained in:
ClaireG 2022-04-08 17:14:41 +02:00 committed by GitHub
parent bd3e98078c
commit f8a3f7ffac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

1
changelog.d/5570.bugfix Normal file
View File

@ -0,0 +1 @@
Use member name instead of room name in DM creation item

View File

@ -133,7 +133,10 @@ abstract class MergedRoomCreationItem : BasedMergedItem<MergedRoomCreationItem.H
val membersCount = roomSummary?.otherMemberIds?.size ?: 0
if (isDirect) {
holder.roomDescriptionText.text = holder.view.resources.getString(R.string.this_is_the_beginning_of_dm, roomSummary?.displayName ?: "")
holder.roomDescriptionText.text = holder.view.resources.getString(
R.string.this_is_the_beginning_of_dm,
distinctMergeData.lastOrNull()?.memberName ?: ""
)
} else if (roomDisplayName.isNullOrBlank() || roomSummary.name.isBlank()) {
holder.roomDescriptionText.text = holder.view.resources.getString(R.string.this_is_the_beginning_of_room_no_name)
} else {