Prechádzať zdrojové kódy

VLCMediaCategoryViewController: Search: Reset research data

Soomin Lee 6 rokov pred
rodič
commit
900531d9db

+ 2 - 0
Sources/MediaCategories/MediaCategoryViewController.swift

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