diff options
author | marinofaggiana <marino@marinofaggiana.com> | 2021-01-14 19:13:27 +0300 |
---|---|---|
committer | marinofaggiana <marino@marinofaggiana.com> | 2021-01-14 19:13:27 +0300 |
commit | 6acfd822d1cb3fb854de5bee878dfc4410ddfad1 (patch) | |
tree | cb4b503e536f1ea56bc7f224f83f9fc57d56d3a7 /iOSClient/Media | |
parent | 18a140fc48f7222c9002a5a996260098000ac2ea (diff) |
fix
Diffstat (limited to 'iOSClient/Media')
-rw-r--r-- | iOSClient/Media/NCMedia.swift | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/iOSClient/Media/NCMedia.swift b/iOSClient/Media/NCMedia.swift index 75f102c61..9fef24bfc 100644 --- a/iOSClient/Media/NCMedia.swift +++ b/iOSClient/Media/NCMedia.swift @@ -508,10 +508,22 @@ extension NCMedia: UICollectionViewDelegate { var titleDelete = NSLocalizedString("_delete_photo_", comment: "") if metadata.typeFile == NCBrandGlobal.shared.metadataTypeFileVideo { titleDelete = NSLocalizedString("_delete_video_", comment: "") } - let save = UIAction(title: NSLocalizedString("_save_selected_files_", comment: ""), image: UIImage(systemName: "square.and.arrow.down")) { action in + 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) } + if metadata.typeFile == NCBrandGlobal.shared.metadataTypeFileImage || metadata.typeFile == NCBrandGlobal.shared.metadataTypeFileVideo || metadata.typeFile == NCBrandGlobal.shared.metadataTypeFileAudio { + if let metadataLive = NCManageDatabase.shared.isLivePhoto(metadata: metadata) { + if CCUtility.fileProviderStorageExists(metadata.ocId, fileNameView: metadata.fileNameView) && CCUtility.fileProviderStorageExists(metadataLive.ocId, fileNameView: metadataLive.fileNameView) { + + save = UIAction(title: NSLocalizedString("_livephoto_save_", comment: ""), image: UIImage(systemName: "square.and.arrow.down")) { action in + + NCCollectionCommon.shared.saveLivePhoto(metadata: metadata, metadataMov: metadataLive, progressView: nil) + } + } + } + } + let openIn = UIAction(title: NSLocalizedString("_open_in_", comment: ""), image: UIImage(systemName: "square.and.arrow.up") ) { action in NCNetworkingNotificationCenter.shared.downloadOpen(metadata: metadata, selector: NCBrandGlobal.shared.selectorOpenIn) } |