removes dead code
& correctly dismisses sheets
This commit is contained in:
parent
dfe314f214
commit
99b2d3bb01
@ -52,7 +52,6 @@ class AccountsPreferencesModel: ObservableObject {
|
|||||||
account?.name = accountName
|
account?.name = accountName
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@Published var showAddCredentialsView: Bool = false
|
|
||||||
|
|
||||||
// Sheets
|
// Sheets
|
||||||
@Published var showSheet: Bool = false
|
@Published var showSheet: Bool = false
|
||||||
|
@ -95,6 +95,7 @@ struct AddAccountView: View {
|
|||||||
.onChange(of: viewModel.accountAdded) { value in
|
.onChange(of: viewModel.accountAdded) { value in
|
||||||
if value == true {
|
if value == true {
|
||||||
preferencesModel.showAddAccountView = false
|
preferencesModel.showAddAccountView = false
|
||||||
|
presentationMode.wrappedValue.dismiss()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.alert(isPresented: $viewModel.showError) {
|
.alert(isPresented: $viewModel.showError) {
|
||||||
|
@ -70,6 +70,7 @@ struct EditAccountCredentialsView: View {
|
|||||||
.onChange(of: editModel.accountCredentialsWereUpdated) { value in
|
.onChange(of: editModel.accountCredentialsWereUpdated) { value in
|
||||||
if value == true {
|
if value == true {
|
||||||
viewModel.sheetToShow = .none
|
viewModel.sheetToShow = .none
|
||||||
|
presentationMode.wrappedValue.dismiss()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.alert(isPresented: $editModel.showError) {
|
.alert(isPresented: $editModel.showError) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user