Browse Source

VLCMediaCategoryViewController: Search: Reset research data

Soomin Lee 6 years ago
parent
commit
900531d9db
1 changed files with 2 additions and 0 deletions
  1. 2 0
      Sources/MediaCategories/MediaCategoryViewController.swift

+ 2 - 0
Sources/MediaCategories/MediaCategoryViewController.swift

@@ -306,7 +306,9 @@ extension VLCMediaCategoryViewController {
 
 
     func searchBarCancelButtonClicked(_ searchBar: UISearchBar) {
     func searchBarCancelButtonClicked(_ searchBar: UISearchBar) {
         searchBar.resignFirstResponder()
         searchBar.resignFirstResponder()
+        // Empty the text field and reset the research
         searchBar.text = ""
         searchBar.text = ""
+        searchDataSource.shouldReloadFor(searchString: "")
         searchBar.setShowsCancelButton(false, animated: true)
         searchBar.setShowsCancelButton(false, animated: true)
         reloadData()
         reloadData()
     }
     }