mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Enable the App Lock feature. (#1990)
This commit is contained in:
-1
@@ -49,7 +49,6 @@ protocol DeveloperOptionsProtocol: AnyObject {
|
||||
var userSuggestionsEnabled: Bool { get set }
|
||||
var readReceiptsEnabled: Bool { get set }
|
||||
var swiftUITimelineEnabled: Bool { get set }
|
||||
var appLockFlowEnabled: Bool { get set }
|
||||
var elementCallEnabled: Bool { get set }
|
||||
var chatBackupEnabled: Bool { get set }
|
||||
}
|
||||
|
||||
-5
@@ -36,11 +36,6 @@ struct DeveloperOptionsScreen: View {
|
||||
Text("Chat backup")
|
||||
Text("Requires app reboot")
|
||||
}
|
||||
|
||||
Toggle(isOn: $context.appLockFlowEnabled) {
|
||||
Text("PIN/Biometric lock")
|
||||
Text("Resets on reboot")
|
||||
}
|
||||
}
|
||||
|
||||
Section("Timeline") {
|
||||
|
||||
@@ -44,7 +44,6 @@ struct SettingsScreenViewState: BindableState {
|
||||
var isSessionVerified = false
|
||||
var chatBackupEnabled = false
|
||||
var showSecureBackupBadge = false
|
||||
var showAppLockSettings: Bool
|
||||
var showDeveloperOptions: Bool
|
||||
|
||||
/// The presentation anchor used to display the OIDC account URL.
|
||||
|
||||
@@ -37,7 +37,6 @@ class SettingsScreenViewModel: SettingsScreenViewModelType, SettingsScreenViewMo
|
||||
userID: userSession.userID,
|
||||
accountProfileURL: userSession.clientProxy.accountURL(action: .profile),
|
||||
accountSessionsListURL: userSession.clientProxy.accountURL(action: .sessionsList),
|
||||
showAppLockSettings: appSettings.appLockFlowEnabled,
|
||||
showDeveloperOptions: appSettings.canShowDeveloperOptions),
|
||||
imageProvider: userSession.mediaProvider)
|
||||
|
||||
@@ -50,10 +49,6 @@ class SettingsScreenViewModel: SettingsScreenViewModelType, SettingsScreenViewMo
|
||||
.receive(on: DispatchQueue.main)
|
||||
.weakAssign(to: \.state.userDisplayName, on: self)
|
||||
.store(in: &cancellables)
|
||||
|
||||
appSettings.$appLockFlowEnabled
|
||||
.weakAssign(to: \.state.showAppLockSettings, on: self)
|
||||
.store(in: &cancellables)
|
||||
|
||||
appSettings.$chatBackupEnabled
|
||||
.weakAssign(to: \.state.chatBackupEnabled, on: self)
|
||||
|
||||
@@ -125,14 +125,12 @@ struct SettingsScreen: View {
|
||||
})
|
||||
.accessibilityIdentifier(A11yIdentifiers.settingsScreen.analytics)
|
||||
|
||||
if context.viewState.showAppLockSettings {
|
||||
ListRow(label: .default(title: L10n.commonScreenLock,
|
||||
systemIcon: .lock),
|
||||
kind: .navigationLink {
|
||||
context.send(viewAction: .appLock)
|
||||
})
|
||||
.accessibilityIdentifier(A11yIdentifiers.settingsScreen.screenLock)
|
||||
}
|
||||
ListRow(label: .default(title: L10n.commonScreenLock,
|
||||
systemIcon: .lock),
|
||||
kind: .navigationLink {
|
||||
context.send(viewAction: .appLock)
|
||||
})
|
||||
.accessibilityIdentifier(A11yIdentifiers.settingsScreen.screenLock)
|
||||
|
||||
ListRow(label: .default(title: L10n.commonReportABug,
|
||||
systemIcon: .ladybug),
|
||||
|
||||
Reference in New Issue
Block a user