Only show a Matrix ID in the room picker for a direct message

heroes is populated for any room whose name is derived from its members,
not only for direct messages, so a two person room that is not a DM
showed a member's Matrix ID as its subtitle.

Carry isDm on SelectRoomInfo and read the hero only when it is set. The
canonical alias still takes precedence, so nothing changes for a room
that has one.
This commit is contained in:
hayaksi1
2026-08-10 16:46:58 +03:00
parent acb9e0e082
commit 629dc15a86
6 changed files with 35 additions and 1 deletions
@@ -87,6 +87,7 @@ internal fun aSelectRoomInfoList(): ImmutableList<SelectRoomInfo> = listOf(
canonicalAlias = null,
avatarUrl = null,
heroes = persistentListOf(),
isDm = false,
isTombstoned = false,
),
SelectRoomInfo(
@@ -95,6 +96,7 @@ internal fun aSelectRoomInfoList(): ImmutableList<SelectRoomInfo> = listOf(
canonicalAlias = null,
avatarUrl = null,
heroes = persistentListOf(),
isDm = false,
isTombstoned = false,
),
SelectRoomInfo(
@@ -103,6 +105,7 @@ internal fun aSelectRoomInfoList(): ImmutableList<SelectRoomInfo> = listOf(
canonicalAlias = null,
avatarUrl = null,
heroes = persistentListOf(),
isDm = false,
isTombstoned = false,
),
).toImmutableList()