Fixed add accounts

This commit is contained in:
Thomas Ricouard 2022-12-30 08:58:32 +01:00
parent 059fe3463b
commit e93e05872a
2 changed files with 1 additions and 3 deletions

View file

@ -34,8 +34,8 @@ class AppAccountsManager: ObservableObject {
func add(account: AppAccount) {
do {
try account.save()
currentAccount = account
availableAccounts.append(account)
currentAccount = account
} catch { }
}

View file

@ -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 {