mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
implemented the labs screen
This commit is contained in:
-1
@@ -41,7 +41,6 @@ protocol DeveloperOptionsProtocol: AnyObject {
|
||||
|
||||
var enableOnlySignedDeviceIsolationMode: Bool { get set }
|
||||
var enableKeyShareOnInvite: Bool { get set }
|
||||
var threadsEnabled: Bool { get set }
|
||||
var spacesEnabled: Bool { get set }
|
||||
var hideQuietNotificationAlerts: Bool { get set }
|
||||
|
||||
|
||||
-4
@@ -33,10 +33,6 @@ struct DeveloperOptionsScreen: View {
|
||||
}
|
||||
|
||||
Section("General") {
|
||||
Toggle(isOn: $context.threadsEnabled) {
|
||||
Text("Threads")
|
||||
}
|
||||
|
||||
Toggle(isOn: $context.spacesEnabled) {
|
||||
Text("Spaces")
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ enum SettingsScreenCoordinatorAction {
|
||||
case manageAccount(url: URL)
|
||||
case notifications
|
||||
case advancedSettings
|
||||
case labs
|
||||
case developerOptions
|
||||
case deactivateAccount
|
||||
}
|
||||
@@ -75,6 +76,8 @@ final class SettingsScreenCoordinator: CoordinatorProtocol {
|
||||
actionsSubject.send(.notifications)
|
||||
case .advancedSettings:
|
||||
actionsSubject.send(.advancedSettings)
|
||||
case .labs:
|
||||
actionsSubject.send(.labs)
|
||||
case .developerOptions:
|
||||
actionsSubject.send(.developerOptions)
|
||||
case .logout:
|
||||
|
||||
@@ -20,6 +20,7 @@ enum SettingsScreenViewModelAction: Equatable {
|
||||
case secureBackup
|
||||
case notifications
|
||||
case advancedSettings
|
||||
case labs
|
||||
case developerOptions
|
||||
case logout
|
||||
case deactivateAccount
|
||||
@@ -69,6 +70,7 @@ enum SettingsScreenViewAction {
|
||||
case enableDeveloperOptions
|
||||
case developerOptions
|
||||
case advancedSettings
|
||||
case labs
|
||||
case logout
|
||||
case deactivateAccount
|
||||
}
|
||||
|
||||
@@ -112,6 +112,8 @@ class SettingsScreenViewModel: SettingsScreenViewModelType, SettingsScreenViewMo
|
||||
actionsSubject.send(.notifications)
|
||||
case .advancedSettings:
|
||||
actionsSubject.send(.advancedSettings)
|
||||
case .labs:
|
||||
actionsSubject.send(.labs)
|
||||
case .enableDeveloperOptions:
|
||||
appSettings.developerOptionsEnabled.toggle()
|
||||
case .developerOptions:
|
||||
|
||||
@@ -137,6 +137,19 @@ struct SettingsScreen: View {
|
||||
|
||||
private var generalSection: some View {
|
||||
Section {
|
||||
ListRow(label: .default(title: L10n.commonAdvancedSettings,
|
||||
icon: \.settings),
|
||||
kind: .navigationLink {
|
||||
context.send(viewAction: .advancedSettings)
|
||||
})
|
||||
.accessibilityIdentifier(A11yIdentifiers.settingsScreen.advancedSettings)
|
||||
|
||||
ListRow(label: .default(title: L10n.screenAdvancedSettingsLabs,
|
||||
icon: \.labs),
|
||||
kind: .navigationLink {
|
||||
context.send(viewAction: .labs)
|
||||
})
|
||||
|
||||
ListRow(label: .default(title: L10n.commonAbout,
|
||||
icon: \.info),
|
||||
kind: .navigationLink {
|
||||
@@ -161,13 +174,6 @@ struct SettingsScreen: View {
|
||||
})
|
||||
.accessibilityIdentifier(A11yIdentifiers.settingsScreen.analytics)
|
||||
}
|
||||
|
||||
ListRow(label: .default(title: L10n.commonAdvancedSettings,
|
||||
icon: \.settings),
|
||||
kind: .navigationLink {
|
||||
context.send(viewAction: .advancedSettings)
|
||||
})
|
||||
.accessibilityIdentifier(A11yIdentifiers.settingsScreen.advancedSettings)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user