mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 10:33:45 +00:00
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:
|
case .show:
|
||||||
room.hasUnreads ? .compound.bodyLGSemibold : .compound.bodyLG
|
room.hasUnreads ? .compound.bodyLGSemibold : .compound.bodyLG
|
||||||
case .hide:
|
case .hide:
|
||||||
.compound.bodyLG
|
room.isHighlighted ? .compound.bodyLGSemibold : .compound.bodyLG
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -169,10 +169,21 @@ struct HomeScreenRoomCell: View {
|
|||||||
private var lastMessage: some View {
|
private var lastMessage: some View {
|
||||||
if let displayedLastMessage = room.displayedLastMessage {
|
if let displayedLastMessage = room.displayedLastMessage {
|
||||||
Text(displayedLastMessage)
|
Text(displayedLastMessage)
|
||||||
.font(roomListActivityVisibility == .show ? (room.hasUnreads ? .compound.bodyMDSemibold : .compound.bodyMD) : .compound.bodyMD)
|
.font(lastMessageFont)
|
||||||
.lastMessageFormatting(hasFailed: room.lastMessageState == .failed)
|
.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 {
|
struct HomeScreenRoomCellButtonStyle: ButtonStyle {
|
||||||
|
|||||||
Reference in New Issue
Block a user