From 962fee1eb0cb82bb8728d6fb7657a1f5d3f22264 Mon Sep 17 00:00:00 2001 From: Vladyslav shepitko Date: Mon, 16 Nov 2020 10:39:33 +0200 Subject: [PATCH] Crash sometimes when searching in Activity tab #2281 --- .../ViewControllers/ActivitiesViewController.swift | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/AlphaWallet/Activities/ViewControllers/ActivitiesViewController.swift b/AlphaWallet/Activities/ViewControllers/ActivitiesViewController.swift index c1c5f3cd6..ee4fc7c6c 100644 --- a/AlphaWallet/Activities/ViewControllers/ActivitiesViewController.swift +++ b/AlphaWallet/Activities/ViewControllers/ActivitiesViewController.swift @@ -298,16 +298,8 @@ extension ActivitiesViewController: UISearchResultsUpdating { private func processSearchWithKeywords() { let keyword = searchController.searchBar.text - - DispatchQueue.global().async { [weak self] in - guard let strongSelf = self else { return } - - strongSelf.viewModel.filter(.keyword(keyword)) - - DispatchQueue.main.async { - strongSelf.tableView.reloadData() - } - } + viewModel.filter(.keyword(keyword)) + tableView.reloadData() } }