From 56869e3a2f24b662e142defc8ff324d0d85e3523 Mon Sep 17 00:00:00 2001 From: Thomas Ricouard Date: Wed, 14 Aug 2024 17:23:00 +0200 Subject: [PATCH] Allow cancel add account sheet even when no account --- IceCubesApp/App/Tabs/Settings/AddAccountsView.swift | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/IceCubesApp/App/Tabs/Settings/AddAccountsView.swift b/IceCubesApp/App/Tabs/Settings/AddAccountsView.swift index 325dca87..741be139 100644 --- a/IceCubesApp/App/Tabs/Settings/AddAccountsView.swift +++ b/IceCubesApp/App/Tabs/Settings/AddAccountsView.swift @@ -88,9 +88,7 @@ struct AddAccountView: View { .scrollDismissesKeyboard(.immediately) #endif .toolbar { - if !appAccountsManager.availableAccounts.isEmpty { - CancelToolbarItem() - } + CancelToolbarItem() } .onAppear { isInstanceURLFieldFocused = true @@ -290,6 +288,7 @@ struct AddAccountView: View { let oauthToken = try await client.continueOauthFlow(url: url) let client = Client(server: client.server, oauthToken: oauthToken) let account: Account = try await client.get(endpoint: Accounts.verifyCredentials) + Telemetry.signal("account.added") appAccountsManager.add(account: AppAccount(server: client.server, accountName: "\(account.acct)@\(client.server)", oauthToken: oauthToken))