|
@@ -75,14 +75,10 @@ import Queuer
|
|
|
|
|
|
self.openDocumentController(metadata: metadata)
|
|
|
|
|
|
- } else if metadata.classFile == NCGlobal.shared.metadataTypeFileCompress || metadata.classFile == NCGlobal.shared.metadataTypeFileUnknown {
|
|
|
+ } else if metadata.classFile == NCGlobal.shared.metadataClassFileCompress || metadata.classFile == NCGlobal.shared.metadataClassUnknown {
|
|
|
|
|
|
self.openDocumentController(metadata: metadata)
|
|
|
|
|
|
- } else if metadata.classFile == NCGlobal.shared.metadataTypeFileImagemeter {
|
|
|
-
|
|
|
- self.openDocumentController(metadata: metadata)
|
|
|
-
|
|
|
} else {
|
|
|
|
|
|
if let viewController = self.appDelegate.activeViewController {
|
|
@@ -316,7 +312,7 @@ import Queuer
|
|
|
let fileNamePath = CCUtility.getDirectoryProviderStorageOcId(metadata.ocId, fileNameView: metadata.fileNameView)!
|
|
|
let status = PHPhotoLibrary.authorizationStatus()
|
|
|
|
|
|
- if metadata.classFile == NCGlobal.shared.metadataTypeFileImage && status == PHAuthorizationStatus.authorized {
|
|
|
+ if metadata.classFile == NCGlobal.shared.metadataClassImage && status == PHAuthorizationStatus.authorized {
|
|
|
|
|
|
if let image = UIImage.init(contentsOfFile: fileNamePath) {
|
|
|
UIImageWriteToSavedPhotosAlbum(image, self, #selector(SaveAlbum(_:didFinishSavingWithError:contextInfo:)), nil)
|
|
@@ -324,7 +320,7 @@ import Queuer
|
|
|
NCContentPresenter.shared.messageNotification("_save_selected_files_", description: "_file_not_saved_cameraroll_", delay: NCGlobal.shared.dismissAfterSecond, type: NCContentPresenter.messageType.error, errorCode: NCGlobal.shared.errorFileNotSaved)
|
|
|
}
|
|
|
|
|
|
- } else if metadata.classFile == NCGlobal.shared.metadataTypeFileVideo && status == PHAuthorizationStatus.authorized {
|
|
|
+ } else if metadata.classFile == NCGlobal.shared.metadataClassVideo && status == PHAuthorizationStatus.authorized {
|
|
|
|
|
|
if UIVideoAtPathIsCompatibleWithSavedPhotosAlbum(fileNamePath) {
|
|
|
UISaveVideoAtPathToSavedPhotosAlbum(fileNamePath, self, #selector(SaveAlbum(_:didFinishSavingWithError:contextInfo:)), nil)
|
|
@@ -876,15 +872,15 @@ import Queuer
|
|
|
|
|
|
var children: [UIMenuElement] = [favorite, offline, openIn, rename, moveCopy, copy, delete]
|
|
|
|
|
|
- if (metadata.contentType != "image/svg+xml") && (metadata.classFile == NCGlobal.shared.metadataTypeFileImage || metadata.classFile == NCGlobal.shared.metadataTypeFileVideo) {
|
|
|
+ if (metadata.contentType != "image/svg+xml") && (metadata.classFile == NCGlobal.shared.metadataClassImage || metadata.classFile == NCGlobal.shared.metadataClassVideo) {
|
|
|
children.insert(save, at: 2)
|
|
|
}
|
|
|
|
|
|
- if (metadata.contentType != "image/svg+xml") && (metadata.classFile == NCGlobal.shared.metadataTypeFileImage) {
|
|
|
+ if (metadata.contentType != "image/svg+xml") && (metadata.classFile == NCGlobal.shared.metadataClassImage) {
|
|
|
children.insert(saveAsScan, at: 2)
|
|
|
}
|
|
|
|
|
|
- if (metadata.contentType != "image/svg+xml") && (metadata.classFile == NCGlobal.shared.metadataTypeFileImage || metadata.contentType == "application/pdf" || metadata.contentType == "com.adobe.pdf") {
|
|
|
+ if (metadata.contentType != "image/svg+xml") && (metadata.classFile == NCGlobal.shared.metadataClassImage || metadata.contentType == "application/pdf" || metadata.contentType == "com.adobe.pdf") {
|
|
|
children.insert(print, at: 2)
|
|
|
}
|
|
|
|
|
@@ -892,11 +888,11 @@ import Queuer
|
|
|
children.insert(viewInFolder, at: children.count-1)
|
|
|
}
|
|
|
|
|
|
- if (!isFolderEncrypted && metadata.contentType != "image/gif" && metadata.contentType != "image/svg+xml") && (metadata.contentType == "com.adobe.pdf" || metadata.contentType == "application/pdf" || metadata.classFile == NCGlobal.shared.metadataTypeFileImage) {
|
|
|
+ if (!isFolderEncrypted && metadata.contentType != "image/gif" && metadata.contentType != "image/svg+xml") && (metadata.contentType == "com.adobe.pdf" || metadata.contentType == "application/pdf" || metadata.classFile == NCGlobal.shared.metadataClassImage) {
|
|
|
children.insert(modify, at: children.count-1)
|
|
|
}
|
|
|
|
|
|
- if metadata.classFile == NCGlobal.shared.metadataTypeFileImage && viewController is NCCollectionViewCommon && !NCBrandOptions.shared.disable_background_image {
|
|
|
+ if metadata.classFile == NCGlobal.shared.metadataClassImage && viewController is NCCollectionViewCommon && !NCBrandOptions.shared.disable_background_image {
|
|
|
let viewController: NCCollectionViewCommon = viewController as! NCCollectionViewCommon
|
|
|
let layoutKey = viewController.layoutKey
|
|
|
if layoutKey == NCGlobal.shared.layoutViewFiles {
|