Browse Source

https://github.com/nextcloud/ios/issues/126

Marino Faggiana 8 years ago
parent
commit
5e1f51a4e8

+ 0 - 3
iOSClient/Actions/CCActions.swift

@@ -382,9 +382,6 @@ class CCActions: NSObject {
     func downloadThumbnailFailure(_ metadataNet: CCMetadataNet, message: NSString, errorCode: NSInteger) {
         
         NSLog("[LOG] Thumbnail Error \(metadataNet.fileName!) \(message) error %\(errorCode))")
-        
-        // Activity
-        CCCoreData.addActivityClient(metadataNet.fileID, fileID: "", action: k_activityDebugActionDownloadThumbnail, selector: metadataNet.selector! , note: "Error: \(message)", type: k_activityTypeFailure, verbose: Int(k_activityVerboseHigh), account: appDelegate.activeAccount)
     }
 
     // --------------------------------------------------------------------------------------------

+ 10 - 1
iOSClient/Main/CCMain.m

@@ -1938,6 +1938,8 @@
             
             [[CCActions sharedInstance] search:_serverUrl fileName:_searchFileName depth:_depth delegate:self];
             
+            [self setTitleBackgroundTableView:NSLocalizedString(@"_search_in_progress_", nil)];
+            
         } else {
             
             NSString *directoryID = [CCCoreData getDirectoryIDFromServerUrl:_serverUrl activeAccount:app.activeAccount];
@@ -4866,8 +4868,15 @@
         
         [self tableViewReload];
         
-        [self setTitleBackgroundTableView:nil];
+        if ([_sectionDataSource.allRecordsDataSource count] == 0 && [_searchFileName length] >= k_minCharsSearch)
+            [self setTitleBackgroundTableView:NSLocalizedString(@"_search_no_record_found_", nil)];
         
+        if ([_sectionDataSource.allRecordsDataSource count] == 0 && [_searchFileName length] < k_minCharsSearch)
+            [self setTitleBackgroundTableView:NSLocalizedString(@"_search_instruction_", nil)];
+        
+        if ([_sectionDataSource.allRecordsDataSource count] > 0 && [_searchFileName length] >= k_minCharsSearch)
+            [self setTitleBackgroundTableView:nil];
+            
         [app updateApplicationIconBadgeNumber];
         
         return;

+ 5 - 3
iOSClient/PhotosCameraUpload/CCPhotosCameraUpload.m

@@ -84,6 +84,8 @@
     // empty Data Source
     self.collectionView.emptyDataSetDelegate = self;
     self.collectionView.emptyDataSetSource = self;
+    
+    [self reloadDatasource];
 }
 
 // Apparirà
@@ -97,14 +99,14 @@
     
     // Plus Button
     [app plusButtonVisibile:true];
-    
-    [self reloadDatasource];
 }
 
 // E' arrivato
 - (void)viewDidAppear:(BOOL)animated
 {
-    [super viewDidAppear:animated];    
+    [super viewDidAppear:animated];
+    
+    [self reloadDatasource];
 }
 
 - (void)didReceiveMemoryWarning

+ 3 - 0
iOSClient/Supporting Files/en.lproj/Localizable.strings

@@ -383,6 +383,9 @@
 "_directory_on_top_yes_"        = "✓ Folders on top";
 "_directory_on_top_no_"         = "Folders on top";
 "_folder_automatic_upload_"     = "Folder for Automatic upload";
+"_search_no_record_found_"      = "No result";
+"_search_in_progress_"          = "Search in progress...";
+"_search_instruction_"          = "Search a file (minimum 2 characters)";
 
 "audio"                         = "AUDIO";
 "compress"                      = "COMPRESS";