Merge pull request #2283 from AlphaWallet/#2281

Crash sometimes when searching in Activity tab #2281
pull/2290/head
Hwee-Boon Yar 4 years ago committed by GitHub
commit 2ea6f019d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      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()
}
}

Loading…
Cancel
Save