Apply differences on main-queue

This fixes a lot of warnings in Console when searching for a server
This commit is contained in:
Nathan Mattes 2023-06-01 16:19:06 +02:00
parent ca61d29ae2
commit 5513174696
1 changed files with 2 additions and 3 deletions

View File

@ -298,10 +298,9 @@ extension MastodonLoginViewController: MastodonLoginViewModelDelegate {
snapshot.appendSections([MastodonLoginViewSection.servers])
snapshot.appendItems(viewModel.filteredServers)
dataSource?.apply(snapshot, animatingDifferences: false)
DispatchQueue.main.async {
self.dataSource?.apply(snapshot, animatingDifferences: false)
let numberOfResults = viewModel.filteredServers.count
self.contentView.updateCorners(numberOfResults: numberOfResults)
}