瀏覽代碼

VLCMediaCategoryViewController: Search: Reset research data

Soomin Lee 6 年之前
父節點
當前提交
900531d9db
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      Sources/MediaCategories/MediaCategoryViewController.swift

+ 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()
     }