Bold the room cell when highlighted if not showing all activity. (#5468)

This commit is contained in:
Doug
2026-04-22 16:04:33 +01:00
committed by GitHub
parent cc3ebc3768
commit 37d0863835

View File

@@ -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 {