From 37d0863835a8ecb678ec87c40013a3d7027e1520 Mon Sep 17 00:00:00 2001 From: Doug <6060466+pixlwave@users.noreply.github.com> Date: Wed, 22 Apr 2026 16:04:33 +0100 Subject: [PATCH] Bold the room cell when highlighted if not showing all activity. (#5468) --- .../HomeScreen/View/HomeScreenRoomCell.swift | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/ElementX/Sources/Screens/HomeScreen/View/HomeScreenRoomCell.swift b/ElementX/Sources/Screens/HomeScreen/View/HomeScreenRoomCell.swift index 40e1ff15c..401fa4c49 100644 --- a/ElementX/Sources/Screens/HomeScreen/View/HomeScreenRoomCell.swift +++ b/ElementX/Sources/Screens/HomeScreen/View/HomeScreenRoomCell.swift @@ -95,7 +95,7 @@ struct HomeScreenRoomCell: View { case .show: room.hasUnreads ? .compound.bodyLGSemibold : .compound.bodyLG case .hide: - .compound.bodyLG + room.isHighlighted ? .compound.bodyLGSemibold : .compound.bodyLG } } @@ -169,10 +169,21 @@ struct HomeScreenRoomCell: View { private var lastMessage: some View { if let displayedLastMessage = room.displayedLastMessage { Text(displayedLastMessage) - .font(roomListActivityVisibility == .show ? (room.hasUnreads ? .compound.bodyMDSemibold : .compound.bodyMD) : .compound.bodyMD) + .font(lastMessageFont) .lastMessageFormatting(hasFailed: room.lastMessageState == .failed) } } + + private var lastMessageFont: Font { + switch roomListActivityVisibility { + case .current: + .compound.bodyMD + case .show: + room.hasUnreads ? .compound.bodyMDSemibold : .compound.bodyMD + case .hide: + room.isHighlighted ? .compound.bodyMDSemibold : .compound.bodyMD + } + } } struct HomeScreenRoomCellButtonStyle: ButtonStyle {