fix: Only allow double-tap account toggle if more than 1 account exists

This commit is contained in:
Marcus Kida 2022-11-16 13:43:54 +01:00
parent 26576d888e
commit 634796e9dc
No known key found for this signature in database
GPG Key ID: 19FF64E08013CA40
1 changed files with 1 additions and 1 deletions

View File

@ -407,7 +407,7 @@ extension MainTabBarController {
assert(Thread.isMainThread)
let request = MastodonAuthentication.sortedFetchRequest
guard let accounts = try? context.managedObjectContext.fetch(request) else { return }
guard let accounts = try? context.managedObjectContext.fetch(request), accounts.count > 1 else { return }
let nextSelectedAccountIndex: Int? = {
for (index, account) in accounts.enumerated() {