diff --git a/Tusker/Screens/Account List/AccountListViewController.swift b/Tusker/Screens/Account List/AccountListViewController.swift index 8f89e064..053c7b0d 100644 --- a/Tusker/Screens/Account List/AccountListViewController.swift +++ b/Tusker/Screens/Account List/AccountListViewController.swift @@ -57,7 +57,14 @@ class AccountListViewController: UIViewController { snapshot.appendItems(accountIDs) dataSource.apply(snapshot, animatingDifferences: false) } - + + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + + collectionView.indexPathsForSelectedItems?.forEach { + collectionView.deselectItem(at: $0, animated: true) + } + } } extension AccountListViewController { diff --git a/Tusker/Screens/Status Action Account List/StatusActionAccountListViewController.swift b/Tusker/Screens/Status Action Account List/StatusActionAccountListViewController.swift index bce7dc9c..60e2d432 100644 --- a/Tusker/Screens/Status Action Account List/StatusActionAccountListViewController.swift +++ b/Tusker/Screens/Status Action Account List/StatusActionAccountListViewController.swift @@ -120,6 +120,10 @@ class StatusActionAccountListViewController: UIViewController { override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) + collectionView.indexPathsForSelectedItems?.forEach { + collectionView.deselectItem(at: $0, animated: true) + } + if accountIDs == nil { Task { await loadAccounts()