delete old open settings
This commit is contained in:
parent
b46fc3ae16
commit
7a2fb798a3
@ -69,6 +69,9 @@
|
||||
},
|
||||
"After Register View" : {
|
||||
|
||||
},
|
||||
"Close" : {
|
||||
|
||||
},
|
||||
"Companion ID" : {
|
||||
"comment" : "Search placeholder companion title"
|
||||
@ -185,6 +188,9 @@
|
||||
},
|
||||
"Qr" : {
|
||||
|
||||
},
|
||||
"Welcome" : {
|
||||
|
||||
},
|
||||
"Yobble" : {
|
||||
"localizations" : {
|
||||
|
||||
@ -8,13 +8,27 @@
|
||||
import SwiftUI
|
||||
|
||||
struct AfterRegisterView: View {
|
||||
@Binding var isPresented: Bool
|
||||
|
||||
var body: some View {
|
||||
NavigationView {
|
||||
VStack {
|
||||
Text("After Register View")
|
||||
}
|
||||
.navigationTitle("Welcome")
|
||||
.toolbar {
|
||||
ToolbarItem(placement: .navigationBarLeading) {
|
||||
Button("Close") {
|
||||
isPresented = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct AfterRegisterView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
AfterRegisterView()
|
||||
AfterRegisterView(isPresented: .constant(true))
|
||||
}
|
||||
}
|
||||
@ -174,16 +174,13 @@ struct MainView: View {
|
||||
}
|
||||
.onAppear {
|
||||
enforceTabSelectionForMessengerMode()
|
||||
handleTwoFactorOnboardingIfNeeded()
|
||||
handleAfterRegisterOnboardingIfNeeded()
|
||||
}
|
||||
.onChange(of: isMessengerModeEnabled) { _ in
|
||||
enforceTabSelectionForMessengerMode()
|
||||
handleTwoFactorOnboardingIfNeeded()
|
||||
handleAfterRegisterOnboardingIfNeeded()
|
||||
}
|
||||
.onChange(of: viewModel.onboardingDestination) { _ in
|
||||
handleTwoFactorOnboardingIfNeeded()
|
||||
handleAfterRegisterOnboardingIfNeeded()
|
||||
}
|
||||
.onChange(of: messageCenter.pendingNavigation?.id) { _ in
|
||||
@ -213,8 +210,8 @@ struct MainView: View {
|
||||
isSettingsPresented = false
|
||||
}
|
||||
}
|
||||
.sheet(isPresented: $isAfterRegisterPresented) {
|
||||
AfterRegisterView()
|
||||
.fullScreenCover(isPresented: $isAfterRegisterPresented) {
|
||||
AfterRegisterView(isPresented: $isAfterRegisterPresented)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -132,12 +132,6 @@ struct SettingsView: View {
|
||||
}
|
||||
}
|
||||
.navigationTitle("Настройки")
|
||||
.onAppear {
|
||||
handleTwoFactorOnboardingIfNeeded()
|
||||
}
|
||||
.onChange(of: viewModel.onboardingDestination) { _ in
|
||||
handleTwoFactorOnboardingIfNeeded()
|
||||
}
|
||||
}
|
||||
|
||||
private func openLanguageSettings() {
|
||||
@ -178,13 +172,3 @@ struct SettingsView: View {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private extension SettingsView {
|
||||
func handleTwoFactorOnboardingIfNeeded() {
|
||||
guard viewModel.onboardingDestination == .securitySettings else { return }
|
||||
guard !isSecurityActive else { return }
|
||||
DispatchQueue.main.async {
|
||||
isSecurityActive = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user