From 9d2df6fba79852bc412441971cb269337891dd7f Mon Sep 17 00:00:00 2001 From: dankito Date: Wed, 12 Aug 2020 23:04:03 +0200 Subject: [PATCH] Fixed that AddAccountDialog got shown over and over again (next SwiftUI bug) --- ui/BankingiOSApp/BankingiOSApp.xcodeproj/project.pbxproj | 4 ++++ .../BankingiOSApp/ui/views/AddAccountButtonView.swift | 3 +++ 2 files changed, 7 insertions(+) diff --git a/ui/BankingiOSApp/BankingiOSApp.xcodeproj/project.pbxproj b/ui/BankingiOSApp/BankingiOSApp.xcodeproj/project.pbxproj index 1fd1f5c3..1422f051 100644 --- a/ui/BankingiOSApp/BankingiOSApp.xcodeproj/project.pbxproj +++ b/ui/BankingiOSApp/BankingiOSApp.xcodeproj/project.pbxproj @@ -8,6 +8,7 @@ /* Begin PBXBuildFile section */ 3607829924E148D40098FEFE /* AdaptsToKeyboard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3607829824E148D40098FEFE /* AdaptsToKeyboard.swift */; }; + 360782C124E18D5E0098FEFE /* AddAccountButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 360782C024E18D5E0098FEFE /* AddAccountButtonView.swift */; }; 366FA4DA24C472A90094F009 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 366FA4D924C472A90094F009 /* Extensions.swift */; }; 366FA4DC24C479120094F009 /* BankInfoListItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 366FA4DB24C479120094F009 /* BankInfoListItem.swift */; }; 366FA4E024C4924A0094F009 /* RemitteeListItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 366FA4DF24C4924A0094F009 /* RemitteeListItem.swift */; }; @@ -126,6 +127,7 @@ /* Begin PBXFileReference section */ 3607829824E148D40098FEFE /* AdaptsToKeyboard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdaptsToKeyboard.swift; sourceTree = ""; }; + 360782C024E18D5E0098FEFE /* AddAccountButtonView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddAccountButtonView.swift; sourceTree = ""; }; 366FA4D924C472A90094F009 /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; 366FA4DB24C479120094F009 /* BankInfoListItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BankInfoListItem.swift; sourceTree = ""; }; 366FA4DF24C4924A0094F009 /* RemitteeListItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RemitteeListItem.swift; sourceTree = ""; }; @@ -411,6 +413,7 @@ isa = PBXGroup; children = ( 36FC92DB24B3A4A0002B12E9 /* AccountsTab.swift */, + 360782C024E18D5E0098FEFE /* AddAccountButtonView.swift */, 36FC92EE24B3BB81002B12E9 /* AddAccountDialog.swift */, 36BE068E24CEE1BD00CBBB68 /* AllBanksListItem.swift */, 36BCF88224C098BB005BEC29 /* BankListItem.swift */, @@ -630,6 +633,7 @@ 366FA4E024C4924A0094F009 /* RemitteeListItem.swift in Sources */, 36BE068B24CE3B0400CBBB68 /* SwiftExtensions.swift in Sources */, 36BE065D24CB08FC00CBBB68 /* LazyView.swift in Sources */, + 360782C124E18D5E0098FEFE /* AddAccountButtonView.swift in Sources */, 36BCF86C24BA5E72005BEC29 /* DispatchQueueAsyncRunner.swift in Sources */, 36BCF86324BA5097005BEC29 /* SwiftUiRouter.swift in Sources */, 36FC929C24B39A05002B12E9 /* AppDelegate.swift in Sources */, diff --git a/ui/BankingiOSApp/BankingiOSApp/ui/views/AddAccountButtonView.swift b/ui/BankingiOSApp/BankingiOSApp/ui/views/AddAccountButtonView.swift index 0f2b950d..b506d283 100644 --- a/ui/BankingiOSApp/BankingiOSApp/ui/views/AddAccountButtonView.swift +++ b/ui/BankingiOSApp/BankingiOSApp/ui/views/AddAccountButtonView.swift @@ -25,6 +25,9 @@ struct AddAccountButtonView: View { .hidden() .frame(height: 0) } + .onDisappear { + self.showAddAccountDialog = false + } } }