Bold the room cell when highlighted if not showing all activity. (#5468)
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user