mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
avoid problems
This commit is contained in:
-2
@@ -30,7 +30,6 @@ struct DeveloperOptionsScreenViewStateBindings {
|
||||
var readReceiptsEnabled: Bool
|
||||
var isEncryptionSyncEnabled: Bool
|
||||
var notificationSettingsEnabled: Bool
|
||||
var timelineDiffableAnimationsEnabled: Bool
|
||||
}
|
||||
|
||||
enum DeveloperOptionsScreenViewAction {
|
||||
@@ -39,6 +38,5 @@ enum DeveloperOptionsScreenViewAction {
|
||||
case changedReadReceiptsEnabled
|
||||
case changedIsEncryptionSyncEnabled
|
||||
case changedNotificationSettingsEnabled
|
||||
case changedTimelineDiffableAnimationsEnabled
|
||||
case clearCache
|
||||
}
|
||||
|
||||
+1
-4
@@ -30,8 +30,7 @@ class DeveloperOptionsScreenViewModel: DeveloperOptionsScreenViewModelType, Deve
|
||||
userSuggestionsEnabled: appSettings.userSuggestionsEnabled,
|
||||
readReceiptsEnabled: appSettings.readReceiptsEnabled,
|
||||
isEncryptionSyncEnabled: appSettings.isEncryptionSyncEnabled,
|
||||
notificationSettingsEnabled: appSettings.notificationSettingsEnabled,
|
||||
timelineDiffableAnimationsEnabled: appSettings.timelineDiffableAnimationsEnabled)
|
||||
notificationSettingsEnabled: appSettings.notificationSettingsEnabled)
|
||||
let state = DeveloperOptionsScreenViewState(bindings: bindings)
|
||||
|
||||
super.init(initialViewState: state)
|
||||
@@ -53,8 +52,6 @@ class DeveloperOptionsScreenViewModel: DeveloperOptionsScreenViewModelType, Deve
|
||||
appSettings.isEncryptionSyncEnabled = state.bindings.isEncryptionSyncEnabled
|
||||
case .changedNotificationSettingsEnabled:
|
||||
appSettings.notificationSettingsEnabled = state.bindings.notificationSettingsEnabled
|
||||
case .changedTimelineDiffableAnimationsEnabled:
|
||||
appSettings.timelineDiffableAnimationsEnabled = state.bindings.timelineDiffableAnimationsEnabled
|
||||
case .clearCache:
|
||||
callback?(.clearCache)
|
||||
}
|
||||
|
||||
-7
@@ -63,13 +63,6 @@ struct DeveloperOptionsScreen: View {
|
||||
.onChange(of: context.userSuggestionsEnabled) { _ in
|
||||
context.send(viewAction: .changedUserSuggestionsEnabled)
|
||||
}
|
||||
|
||||
Toggle(isOn: $context.timelineDiffableAnimationsEnabled) {
|
||||
Text("Enable diffable animations in the timeline")
|
||||
}
|
||||
.onChange(of: context.timelineDiffableAnimationsEnabled) { _ in
|
||||
context.send(viewAction: .changedTimelineDiffableAnimationsEnabled)
|
||||
}
|
||||
}
|
||||
|
||||
Section {
|
||||
|
||||
Reference in New Issue
Block a user