From 6a95366345edfd2ccbbef0fc6777d7fadad3bba8 Mon Sep 17 00:00:00 2001 From: Mauro <34335419+Velin92@users.noreply.github.com> Date: Fri, 9 Feb 2024 17:12:35 +0100 Subject: [PATCH] Removed the 50ms delay from updating the filters. (#2447) --- ElementX/Sources/Screens/HomeScreen/HomeScreenViewModel.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ElementX/Sources/Screens/HomeScreen/HomeScreenViewModel.swift b/ElementX/Sources/Screens/HomeScreen/HomeScreenViewModel.swift index 2189b15ea..ad2ab21b5 100644 --- a/ElementX/Sources/Screens/HomeScreen/HomeScreenViewModel.swift +++ b/ElementX/Sources/Screens/HomeScreen/HomeScreenViewModel.swift @@ -116,7 +116,7 @@ class HomeScreenViewModel: HomeScreenViewModelType, HomeScreenViewModelProtocol // Don't capture the values here as combine behaves incorrectly and `isSearchFieldFocused` is sometimes // turning to true after cancelling the search. Read them directly from the state in the updateFilter // method instead on the next run loop to make sure they're up to date. - DispatchQueue.main.asyncAfter(deadline: .now() + 0.05) { + DispatchQueue.main.async { self.updateFilter() } }