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
@@ -57,7 +57,6 @@ protocol DeveloperOptionsProtocol: AnyObject {
var hideQuietNotificationAlerts: Bool { get set }
var focusEventOnNotificationTap: Bool { get set }
var roomListActivityVisibility: RoomListActivityVisibility { get set }
var elementCallBaseURLOverride: URL? { get set }
var fuzzyRoomListSearchEnabled: Bool { get set }
@@ -60,13 +60,6 @@ struct DeveloperOptionsScreen: View {
}
Section("Room List") {
Picker("Room list activity visibility", selection: $context.roomListActivityVisibility) {
ForEach(RoomListActivityVisibility.allCases, id: \.self) { visibility in
Text(visibility.rawValue.capitalized)
.tag(visibility)
}
}
Toggle(isOn: $context.fuzzyRoomListSearchEnabled) {
Text("Fuzzy searching")
}
@@ -40,6 +40,7 @@ struct NotificationSettingsScreenViewStateBindings {
var roomMentionsEnabled = false
var callsEnabled = false
var invitationsEnabled = false
var showAllRoomListActivity = true
var alertInfo: AlertInfo<NotificationSettingsScreenErrorType>?
var shouldShowAlertSounds = false
var shouldShowCustomAlertTonePicker = false
@@ -93,6 +94,7 @@ enum NotificationSettingsScreenViewAction {
case roomMentionChanged
case callsChanged
case invitationsChanged
case showAllRoomListActivityChanged
case close
case fixConfigurationMismatchTapped
case selectAlertTone(NotificationTone)
@@ -38,7 +38,8 @@ class NotificationSettingsScreenViewModel: NotificationSettingsScreenViewModelTy
notificationTonePreviewer = AudioPlayer()
self.notificationToneManager = notificationToneManager
let bindings = NotificationSettingsScreenViewStateBindings(enableNotifications: appSettings.enableNotifications)
let bindings = NotificationSettingsScreenViewStateBindings(enableNotifications: appSettings.enableNotifications,
showAllRoomListActivity: appSettings.showAllRoomListActivity)
super.init(initialViewState: NotificationSettingsScreenViewState(bindings: bindings,
isModallyPresented: isModallyPresented,
selectedAlertTone: appSettings.selectedNotificationTone ?? NotificationToneManager.defaultElementXMessageTone,
@@ -102,6 +103,8 @@ class NotificationSettingsScreenViewModel: NotificationSettingsScreenViewModelTy
return
}
Task { await enableInvitations(state.bindings.invitationsEnabled) }
case .showAllRoomListActivityChanged:
appSettings.showAllRoomListActivity = state.bindings.showAllRoomListActivity
case .close:
actionsSubject.send(.close)
case .fixConfigurationMismatchTapped:
@@ -26,7 +26,11 @@ struct NotificationSettingsScreen: View {
if context.enableNotifications {
roomsNotificationSection
}
roomListActivitySection
if context.enableNotifications {
if context.viewState.showCallsSettings, context.viewState.settings?.callsEnabled != nil {
callsSection
}
@@ -139,6 +143,16 @@ struct NotificationSettingsScreen: View {
}
}
private var roomListActivitySection: some View {
Section {
ListRow(label: .plain(title: L10n.screenNotificationSettingsShowAllActivity),
kind: .toggle($context.showAllRoomListActivity))
.onChange(of: context.showAllRoomListActivity) {
context.send(viewAction: .showAllRoomListActivityChanged)
}
}
}
private var callsSection: some View {
Section {
ListRow(label: .plain(title: L10n.screenNotificationSettingsCallsLabel),