From e93e05872a2e5c636463422f0be08b104ba25286 Mon Sep 17 00:00:00 2001 From: Thomas Ricouard Date: Fri, 30 Dec 2022 08:58:32 +0100 Subject: [PATCH] Fixed add accounts --- IceCubesApp/App/AppAccounts/AppAccountsManager.swift | 2 +- IceCubesApp/App/Tabs/Settings/AddAccountsView.swift | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/IceCubesApp/App/AppAccounts/AppAccountsManager.swift b/IceCubesApp/App/AppAccounts/AppAccountsManager.swift index 6e49e380..4b96746d 100644 --- a/IceCubesApp/App/AppAccounts/AppAccountsManager.swift +++ b/IceCubesApp/App/AppAccounts/AppAccountsManager.swift @@ -34,8 +34,8 @@ class AppAccountsManager: ObservableObject { func add(account: AppAccount) { do { try account.save() - currentAccount = account availableAccounts.append(account) + currentAccount = account } catch { } } diff --git a/IceCubesApp/App/Tabs/Settings/AddAccountsView.swift b/IceCubesApp/App/Tabs/Settings/AddAccountsView.swift index 83e3a48e..062b0b1b 100644 --- a/IceCubesApp/App/Tabs/Settings/AddAccountsView.swift +++ b/IceCubesApp/App/Tabs/Settings/AddAccountsView.swift @@ -126,8 +126,6 @@ struct AddAccountView: View { do { let oauthToken = try await client.continueOauthFlow(url: url) appAccountsManager.add(account: AppAccount(server: client.server, oauthToken: oauthToken)) - await currentAccount.fetchCurrentAccount() - await currentInstance.fetchCurrentInstance() isSigninIn = false dismiss() } catch {