Use same way to run stuff on main everywhere (IOS-157)

This commit is contained in:
Nathan Mattes 2023-05-25 15:31:03 +02:00
parent 7a9c002fe8
commit 3597e69f3c
4 changed files with 4 additions and 4 deletions

View File

@ -301,7 +301,7 @@ extension MastodonLoginViewController: MastodonLoginViewModelDelegate {
dataSource?.apply(snapshot, animatingDifferences: false)
OperationQueue.main.addOperation {
DispatchQueue.main.async {
let numberOfResults = viewModel.filteredServers.count
self.contentView.updateCorners(numberOfResults: numberOfResults)
}

View File

@ -65,7 +65,7 @@ extension PickServerSection {
}()
if let proxiedThumbnail = server.proxiedThumbnail, let thumbnailUrl = URL(string: proxiedThumbnail) {
cell.thumbnailImageView.af.setImage(withURL: thumbnailUrl, completion: { _ in
OperationQueue.main.addOperation {
DispatchQueue.main.async {
cell.thumbnailImageView.isHidden = false
}
})

View File

@ -428,7 +428,7 @@ extension ProfileViewController {
}
} receiveValue: { [weak self] menu in
guard let self = self else { return }
OperationQueue.main.addOperation {
DispatchQueue.main.async {
self.moreMenuBarButtonItem.menu = menu
}
}

View File

@ -124,7 +124,7 @@ extension SuggestionAccountViewController: SuggestionAccountTableViewCellDelegat
extension SuggestionAccountViewController: SuggestionAccountTableViewFooterDelegate {
func followAll(_ footerView: SuggestionAccountTableViewFooter) {
viewModel.followAllSuggestedAccounts(self) {
OperationQueue.main.addOperation {
DispatchQueue.main.async {
self.dismiss(animated: true)
}
}