Skip to content

Commit 2031a9d

Browse files
committed
chore(fc): only show "#X" on room crd if no explicit title set
Signed-off-by: Brandon McAnsh <git@bmcreations.dev>
1 parent a1c257b commit 2031a9d

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

flipchatApp/src/main/kotlin/xyz/flipchat/app/features/chat/conversation/ConversationViewModel.kt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -949,6 +949,12 @@ class ConversationViewModel @Inject constructor(
949949
val members = event.conversationWithPointers.members
950950
val host = members.firstOrNull { it.isHost }
951951

952+
val cardTitle = if (conversation.title.startsWith("Room")) {
953+
"#${conversation.roomNumber}"
954+
} else {
955+
conversation.title
956+
}
957+
952958
state.copy(
953959
conversationId = conversation.id,
954960
imageUri = conversation.imageUri.orEmpty().takeIf { it.isNotEmpty() },
@@ -965,7 +971,7 @@ class ConversationViewModel @Inject constructor(
965971
roomInfoArgs = RoomInfoArgs(
966972
roomId = conversation.id,
967973
roomNumber = conversation.roomNumber,
968-
roomTitle = conversation.title,
974+
roomTitle = cardTitle,
969975
ownerId = conversation.ownerId,
970976
hostName = host?.memberName,
971977
memberCount = members.count(),

0 commit comments

Comments
 (0)