From 5513174696bfd207bc7c1ff6b28c358451e2222b Mon Sep 17 00:00:00 2001 From: Nathan Mattes Date: Thu, 1 Jun 2023 16:19:06 +0200 Subject: [PATCH] Apply differences on main-queue This fixes a lot of warnings in Console when searching for a server --- .../Scene/Onboarding/Login/MastodonLoginViewController.swift | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Mastodon/Scene/Onboarding/Login/MastodonLoginViewController.swift b/Mastodon/Scene/Onboarding/Login/MastodonLoginViewController.swift index 8f1cbecf2..c8f614e59 100644 --- a/Mastodon/Scene/Onboarding/Login/MastodonLoginViewController.swift +++ b/Mastodon/Scene/Onboarding/Login/MastodonLoginViewController.swift @@ -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) }