add auto open security
This commit is contained in:
parent
107318ef21
commit
b466864350
@ -46,17 +46,23 @@ struct SecuritySettingsView: View {
|
|||||||
.listStyle(.insetGrouped)
|
.listStyle(.insetGrouped)
|
||||||
.navigationTitle(NSLocalizedString("Безопасность", comment: "Заголовок экрана настроек безопасности"))
|
.navigationTitle(NSLocalizedString("Безопасность", comment: "Заголовок экрана настроек безопасности"))
|
||||||
.navigationBarTitleDisplayMode(.inline)
|
.navigationBarTitleDisplayMode(.inline)
|
||||||
.onAppear { handleSecuritySettingsOnboardingIfNeeded() }
|
// .onAppear { handleSecuritySettingsOnboardingIfNeeded() }
|
||||||
.onChange(of: viewModel.onboardingDestination) { _ in
|
// .onChange(of: viewModel.onboardingDestination) { _ in
|
||||||
handleSecuritySettingsOnboardingIfNeeded()
|
// handleSecuritySettingsOnboardingIfNeeded()
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
private func handleSecuritySettingsOnboardingIfNeeded() {
|
// private func handleSecuritySettingsOnboardingIfNeeded() {
|
||||||
guard viewModel.onboardingDestination == .securitySettings else { return }
|
// guard viewModel.onboardingDestination == .securitySettings else { return }
|
||||||
// isSecuritySettingsActive = true
|
// guard !isTwoFactorActive else {
|
||||||
viewModel.onboardingDestination = nil
|
// viewModel.onboardingDestination = nil
|
||||||
}
|
// return
|
||||||
|
// }
|
||||||
|
// DispatchQueue.main.async {
|
||||||
|
// isTwoFactorActive = true
|
||||||
|
// viewModel.onboardingDestination = nil
|
||||||
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
|
|||||||
@ -182,6 +182,9 @@ struct SettingsView: View {
|
|||||||
private extension SettingsView {
|
private extension SettingsView {
|
||||||
func handleTwoFactorOnboardingIfNeeded() {
|
func handleTwoFactorOnboardingIfNeeded() {
|
||||||
guard viewModel.onboardingDestination == .securitySettings else { return }
|
guard viewModel.onboardingDestination == .securitySettings else { return }
|
||||||
|
guard !isSecurityActive else { return }
|
||||||
|
DispatchQueue.main.async {
|
||||||
isSecurityActive = true
|
isSecurityActive = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user