mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-12-16 20:26:37 +00:00
Fixed add accounts
This commit is contained in:
parent
059fe3463b
commit
e93e05872a
2 changed files with 1 additions and 3 deletions
|
@ -34,8 +34,8 @@ class AppAccountsManager: ObservableObject {
|
||||||
func add(account: AppAccount) {
|
func add(account: AppAccount) {
|
||||||
do {
|
do {
|
||||||
try account.save()
|
try account.save()
|
||||||
currentAccount = account
|
|
||||||
availableAccounts.append(account)
|
availableAccounts.append(account)
|
||||||
|
currentAccount = account
|
||||||
} catch { }
|
} catch { }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -126,8 +126,6 @@ struct AddAccountView: View {
|
||||||
do {
|
do {
|
||||||
let oauthToken = try await client.continueOauthFlow(url: url)
|
let oauthToken = try await client.continueOauthFlow(url: url)
|
||||||
appAccountsManager.add(account: AppAccount(server: client.server, oauthToken: oauthToken))
|
appAccountsManager.add(account: AppAccount(server: client.server, oauthToken: oauthToken))
|
||||||
await currentAccount.fetchCurrentAccount()
|
|
||||||
await currentInstance.fetchCurrentInstance()
|
|
||||||
isSigninIn = false
|
isSigninIn = false
|
||||||
dismiss()
|
dismiss()
|
||||||
} catch {
|
} catch {
|
||||||
|
|
Loading…
Reference in a new issue