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:
Stefan Ceriu
2026-09-25 13:36:33 +03:00
committed by GitHub
parent cc07e07833
commit fc8ee9d93d
22 changed files with 49 additions and 84 deletions
@@ -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 {