Fix cells not being deselected in account list and status action account list

This commit is contained in:
Shadowfacts 2022-11-24 12:30:56 -05:00
parent f23d3dfa3f
commit 92cf938e99
2 changed files with 12 additions and 1 deletions

View File

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

View File

@ -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()