mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 10:33:45 +00:00
updateMembers now is chain of membersNoSync + membersWithSync (#2324)
This commit is contained in:
+2
-2
@@ -33,7 +33,7 @@ struct NotificationSettingsEditScreenViewState: BindableState {
|
||||
var defaultMode: NotificationSettingsEditScreenDefaultMode?
|
||||
var pendingMode: NotificationSettingsEditScreenDefaultMode?
|
||||
var roomsWithUserDefinedMode: [NotificationSettingsEditScreenRoom] = []
|
||||
var canHomeServerPushEncryptedEvents = false
|
||||
var canPushEncryptedEvents = false
|
||||
|
||||
func isSelected(mode: NotificationSettingsEditScreenDefaultMode) -> Bool {
|
||||
pendingMode == nil && defaultMode == mode
|
||||
@@ -41,7 +41,7 @@ struct NotificationSettingsEditScreenViewState: BindableState {
|
||||
|
||||
func description(for mode: NotificationSettingsEditScreenDefaultMode) -> String? {
|
||||
guard mode == .mentionsAndKeywordsOnly,
|
||||
!canHomeServerPushEncryptedEvents else {
|
||||
!canPushEncryptedEvents else {
|
||||
return nil
|
||||
}
|
||||
return L10n.screenNotificationSettingsMentionsOnlyDisclaimer
|
||||
|
||||
+2
-2
@@ -93,7 +93,7 @@ class NotificationSettingsEditScreenViewModel: NotificationSettingsEditScreenVie
|
||||
if encrypted_mode == unencrypted_mode {
|
||||
mode = encrypted_mode
|
||||
}
|
||||
let canHomserverPushEncryptedEvents = await notificationSettingsProxy.canHomeserverPushEncryptedEventsToDevice()
|
||||
let canPushEncryptedEvents = await notificationSettingsProxy.canPushEncryptedEventsToDevice()
|
||||
guard !Task.isCancelled else { return }
|
||||
|
||||
switch mode {
|
||||
@@ -104,7 +104,7 @@ class NotificationSettingsEditScreenViewModel: NotificationSettingsEditScreenVie
|
||||
default:
|
||||
state.defaultMode = nil
|
||||
}
|
||||
state.canHomeServerPushEncryptedEvents = canHomserverPushEncryptedEvents
|
||||
state.canPushEncryptedEvents = canPushEncryptedEvents
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -114,7 +114,7 @@ struct NotificationSettingsEditScreen_Previews: PreviewProvider, TestablePreview
|
||||
}()
|
||||
|
||||
static let viewModelGroupChatsWithouDisclaimer: NotificationSettingsEditScreenViewModel = {
|
||||
let notificationSettingsProxy = NotificationSettingsProxyMock(with: .init(canHomeserverPushEncryptedEvents: true))
|
||||
let notificationSettingsProxy = NotificationSettingsProxyMock(with: .init(canPushEncryptedEvents: true))
|
||||
notificationSettingsProxy.getDefaultRoomNotificationModeIsEncryptedIsOneToOneReturnValue = .allMessages
|
||||
|
||||
notificationSettingsProxy.getRoomsWithUserDefinedRulesReturnValue = [RoomSummary].mockRooms.compactMap(\.id)
|
||||
|
||||
Reference in New Issue
Block a user