diff options
author | marinofaggiana <marino@marinofaggiana.com> | 2021-01-14 20:07:59 +0300 |
---|---|---|
committer | marinofaggiana <marino@marinofaggiana.com> | 2021-01-14 20:07:59 +0300 |
commit | 64e53c47bead4c74508c0b8709aca7fd6b3e1413 (patch) | |
tree | c687f92d2923a91b724bb3fd7dfbf7e141cb6d17 /iOSClient | |
parent | b6a953cd140e104f99f51686d316655111f5a7a8 (diff) |
fix
Diffstat (limited to 'iOSClient')
-rw-r--r-- | iOSClient/Main/Colleaction Common/NCCollectionViewCommon.swift | 11 | ||||
-rw-r--r-- | iOSClient/Media/NCMedia.swift | 11 |
2 files changed, 6 insertions, 16 deletions
diff --git a/iOSClient/Main/Colleaction Common/NCCollectionViewCommon.swift b/iOSClient/Main/Colleaction Common/NCCollectionViewCommon.swift index a902d9e2f..d485671f4 100644 --- a/iOSClient/Main/Colleaction Common/NCCollectionViewCommon.swift +++ b/iOSClient/Main/Colleaction Common/NCCollectionViewCommon.swift @@ -1072,15 +1072,10 @@ extension NCCollectionViewCommon: UICollectionViewDelegate { 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) { + if let metadataMov = NCManageDatabase.shared.isLivePhoto(metadata: metadata) { + save = UIAction(title: NSLocalizedString("_livephoto_save_", comment: ""), image: UIImage(systemName: "square.and.arrow.down")) { action in - 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, viewActivity: self.view) - } - } + NCCollectionCommon.shared.saveLivePhoto(metadata: metadata, metadataMov: metadataMov, progressView: nil, viewActivity: self.view) } } diff --git a/iOSClient/Media/NCMedia.swift b/iOSClient/Media/NCMedia.swift index 8d8d291cb..073e54d3a 100644 --- a/iOSClient/Media/NCMedia.swift +++ b/iOSClient/Media/NCMedia.swift @@ -512,15 +512,10 @@ extension NCMedia: UICollectionViewDelegate { 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) { + if let metadataMov = NCManageDatabase.shared.isLivePhoto(metadata: metadata) { + save = UIAction(title: NSLocalizedString("_livephoto_save_", comment: ""), image: UIImage(systemName: "square.and.arrow.down")) { action in - 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, viewActivity: self.view) - } - } + NCCollectionCommon.shared.saveLivePhoto(metadata: metadata, metadataMov: metadataMov, progressView: nil, viewActivity: self.view) } } |