Skip to content

Commit

Permalink
Fix room name of DM in room creation item
Browse files Browse the repository at this point in the history
  • Loading branch information
Claire1817 authored Apr 8, 2022
1 parent bd3e980 commit f8a3f7f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/5570.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Use member name instead of room name in DM creation item
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit f8a3f7f

Please sign in to comment.