marinofaggiana 4 years ago
parent
commit
0284a897c8

+ 9 - 7
iOSClient/Media/NCMedia.swift

@@ -508,15 +508,17 @@ extension NCMedia: UICollectionViewDelegate {
             
             var titleDelete = NSLocalizedString("_delete_photo_", comment: "")
             if metadata.typeFile == NCBrandGlobal.shared.metadataTypeFileVideo { titleDelete = NSLocalizedString("_delete_video_", comment: "") }
-            
-            var save = UIAction(title: NSLocalizedString("_save_selected_files_", comment: ""), image: UIImage(systemName: "square.and.arrow.down")) { action in
-                NCOperationQueue.shared.download(metadata: metadata, selector: NCBrandGlobal.shared.selectorSaveAlbum, setFavorite: false)
+            var discoverabilityTitleSave: String?
+            let metadataMov = NCManageDatabase.shared.isLivePhoto(metadata: metadata)
+            if metadataMov != nil {
+                discoverabilityTitleSave = NSLocalizedString("_livephoto_save_disco_", comment: "")
             }
             
-            if let metadataMov = NCManageDatabase.shared.isLivePhoto(metadata: metadata) {
-                save = UIAction(title: NSLocalizedString("_livephoto_save_", comment: ""), image: UIImage(systemName: "square.and.arrow.down")) { action in
-                        
-                    NCCollectionCommon.shared.saveLivePhoto(metadata: metadata, metadataMov: metadataMov, progressView: nil, viewActivity: self.view)
+            let save = UIAction(title: NSLocalizedString("_save_selected_files_", comment: ""), image: UIImage(systemName: "square.and.arrow.down"), discoverabilityTitle: discoverabilityTitleSave) { action in
+                if metadataMov != nil  {
+                    NCCollectionCommon.shared.saveLivePhoto(metadata: metadata, metadataMov: metadataMov!, progressView: nil, viewActivity: self.view)
+                } else {
+                    NCOperationQueue.shared.download(metadata: metadata, selector: NCBrandGlobal.shared.selectorSaveAlbum, setFavorite: false)
                 }
             }
             

+ 1 - 1
iOSClient/Supporting Files/en.lproj/Localizable.strings

@@ -127,7 +127,7 @@
 "_download_image_max_"      = "Download the image in full resolution";
 "_livephoto_save_"          = "Save Live Photo to photo album";
 "_livephoto_save_error_"    = "Error during save of Live Photo";
-"_livephoto_save_desc_"     = "If present locally, save as Live Photo";
+"_livephoto_save_disco_"    = "If possible, save as Live Photo";
 "_file_conflict_num_"       = "file conflict";
 "_file_conflicts_num_"      = "file conflicts";
 "_file_conflict_desc_"      = "Which files do you want to keep?\nIf you select both versions, the copied file will have a number added to its name.";