marinofaggiana 4 năm trước cách đây
mục cha
commit
40570de365

+ 5 - 0
iOSClient/Favorites/NCFavorite.swift

@@ -38,6 +38,11 @@ class NCFavorite: NCCollectionViewCommon  {
     // MARK: DZNEmpty
         
     override func image(forEmptyDataSet scrollView: UIScrollView) -> UIImage? {
+        
+        if searchController?.isActive ?? false {
+            return CCGraphics.changeThemingColorImage(UIImage.init(named: "search"), width: 300, height: 300, color: NCBrandColor.sharedInstance.yellowFavorite)
+        }
+        
         return CCGraphics.changeThemingColorImage(UIImage.init(named: "favorite"), width: 300, height: 300, color: NCBrandColor.sharedInstance.yellowFavorite)
     }
     

+ 2 - 0
iOSClient/Main/NCCollectionCommon.swift

@@ -948,6 +948,7 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
         timerInputSearch?.invalidate()
         timerInputSearch = Timer.scheduledTimer(timeInterval: 1.5, target: self, selector: #selector(reloadDataSourceNetwork), userInfo: nil, repeats: false)
         literalSearch = searchController.searchBar.text
+        collectionView?.reloadData()
     }
     
     func searchBarTextDidBeginEditing(_ searchBar: UISearchBar) {
@@ -958,6 +959,7 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
     }
     
     func searchBarCancelButtonClicked(_ searchBar: UISearchBar) {
+        
         isSearching = false
         literalSearch = ""
         reloadDataSource()