Use same way to run stuff on main everywhere (IOS-157)
This commit is contained in:
parent
7a9c002fe8
commit
3597e69f3c
|
@ -301,7 +301,7 @@ extension MastodonLoginViewController: MastodonLoginViewModelDelegate {
|
||||||
|
|
||||||
dataSource?.apply(snapshot, animatingDifferences: false)
|
dataSource?.apply(snapshot, animatingDifferences: false)
|
||||||
|
|
||||||
OperationQueue.main.addOperation {
|
DispatchQueue.main.async {
|
||||||
let numberOfResults = viewModel.filteredServers.count
|
let numberOfResults = viewModel.filteredServers.count
|
||||||
self.contentView.updateCorners(numberOfResults: numberOfResults)
|
self.contentView.updateCorners(numberOfResults: numberOfResults)
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,7 +65,7 @@ extension PickServerSection {
|
||||||
}()
|
}()
|
||||||
if let proxiedThumbnail = server.proxiedThumbnail, let thumbnailUrl = URL(string: proxiedThumbnail) {
|
if let proxiedThumbnail = server.proxiedThumbnail, let thumbnailUrl = URL(string: proxiedThumbnail) {
|
||||||
cell.thumbnailImageView.af.setImage(withURL: thumbnailUrl, completion: { _ in
|
cell.thumbnailImageView.af.setImage(withURL: thumbnailUrl, completion: { _ in
|
||||||
OperationQueue.main.addOperation {
|
DispatchQueue.main.async {
|
||||||
cell.thumbnailImageView.isHidden = false
|
cell.thumbnailImageView.isHidden = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -428,7 +428,7 @@ extension ProfileViewController {
|
||||||
}
|
}
|
||||||
} receiveValue: { [weak self] menu in
|
} receiveValue: { [weak self] menu in
|
||||||
guard let self = self else { return }
|
guard let self = self else { return }
|
||||||
OperationQueue.main.addOperation {
|
DispatchQueue.main.async {
|
||||||
self.moreMenuBarButtonItem.menu = menu
|
self.moreMenuBarButtonItem.menu = menu
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -124,7 +124,7 @@ extension SuggestionAccountViewController: SuggestionAccountTableViewCellDelegat
|
||||||
extension SuggestionAccountViewController: SuggestionAccountTableViewFooterDelegate {
|
extension SuggestionAccountViewController: SuggestionAccountTableViewFooterDelegate {
|
||||||
func followAll(_ footerView: SuggestionAccountTableViewFooter) {
|
func followAll(_ footerView: SuggestionAccountTableViewFooter) {
|
||||||
viewModel.followAllSuggestedAccounts(self) {
|
viewModel.followAllSuggestedAccounts(self) {
|
||||||
OperationQueue.main.addOperation {
|
DispatchQueue.main.async {
|
||||||
self.dismiss(animated: true)
|
self.dismiss(animated: true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue