mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +00:00
Room list notifications tweaks (#6106)
We decided against changing how unread activity is rendered in the room list, so the experiment and its developer option are no longer needed. we have also added a notification settings entry for hiding the room list gray dots.
This commit is contained in:
@@ -15,7 +15,6 @@ struct HomeScreenRoomCell: View {
|
||||
@Environment(\.redactionReasons) private var redactionReasons
|
||||
|
||||
let room: HomeScreenRoom
|
||||
var roomListActivityVisibility: RoomListActivityVisibility = .current
|
||||
let isSelected: Bool
|
||||
let mediaProvider: MediaProviderProtocol!
|
||||
let action: (HomeScreenViewAction) -> Void
|
||||
@@ -82,7 +81,7 @@ struct HomeScreenRoomCell: View {
|
||||
Text(String(statusEmoji))
|
||||
}
|
||||
}
|
||||
.font(headerFont)
|
||||
.font(.compound.bodyLGSemibold)
|
||||
.foregroundColor(.compound.textPrimary)
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
|
||||
@@ -94,17 +93,6 @@ struct HomeScreenRoomCell: View {
|
||||
}
|
||||
}
|
||||
|
||||
private var headerFont: Font {
|
||||
switch roomListActivityVisibility {
|
||||
case .current:
|
||||
.compound.bodyLGSemibold
|
||||
case .show:
|
||||
room.hasUnreads ? .compound.bodyLGSemibold : .compound.bodyLG
|
||||
case .hide:
|
||||
room.isHighlighted ? .compound.bodyLGSemibold : .compound.bodyLG
|
||||
}
|
||||
}
|
||||
|
||||
private var footer: some View {
|
||||
HStack(alignment: .firstTextBaseline, spacing: 0) {
|
||||
ZStack(alignment: .topLeading) {
|
||||
@@ -190,21 +178,10 @@ struct HomeScreenRoomCell: View {
|
||||
private var lastMessage: some View {
|
||||
if let displayedLastMessage = room.displayedLastMessage {
|
||||
Text(displayedLastMessage)
|
||||
.font(lastMessageFont)
|
||||
.font(.compound.bodyMD)
|
||||
.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