|
@@ -31,7 +31,8 @@ extension AppDelegate {
|
|
|
var actions = [NCMenuAction]()
|
|
|
let appDelegate = UIApplication.shared.delegate as! AppDelegate
|
|
|
let directEditingCreators = NCManageDatabase.sharedInstance.getDirectEditingCreators(account: appDelegate.activeAccount)
|
|
|
-
|
|
|
+ let isEncrypted = CCUtility.isFolderEncrypted(appDelegate.activeMain.serverUrl, e2eEncrypted: false, account: appDelegate.activeAccount)
|
|
|
+
|
|
|
actions.append(
|
|
|
NCMenuAction(
|
|
|
title: NSLocalizedString("_upload_photos_videos_", comment: ""),
|
|
@@ -64,7 +65,7 @@ extension AppDelegate {
|
|
|
)
|
|
|
#endif
|
|
|
|
|
|
- if appDelegate.reachability.isReachable() && directEditingCreators != nil && directEditingCreators!.contains(where: { $0.editor == k_editor_text}) {
|
|
|
+ if appDelegate.reachability.isReachable() && directEditingCreators != nil && directEditingCreators!.contains(where: { $0.editor == k_editor_text}) && !isEncrypted {
|
|
|
let directEditingCreator = directEditingCreators!.first(where: { $0.editor == k_editor_text})!
|
|
|
actions.append(
|
|
|
NCMenuAction(title: NSLocalizedString("_create_nextcloudtext_document_", comment: ""), icon: CCGraphics.changeThemingColorImage(UIImage(named: "file_txt"), width: 50, height: 50, color: NCBrandColor.sharedInstance.icon), action: { menuAction in
|
|
@@ -129,7 +130,7 @@ extension AppDelegate {
|
|
|
|
|
|
if #available(iOS 11.0, *) {
|
|
|
if let capabilities = NCManageDatabase.sharedInstance.getCapabilites(account: appDelegate.activeAccount) {
|
|
|
- if (capabilities.versionMajor >= k_nextcloud_version_18_0 && (self.activeMain.richWorkspaceText == nil || self.activeMain.richWorkspaceText.count == 0)) {
|
|
|
+ if (capabilities.versionMajor >= k_nextcloud_version_18_0 && (self.activeMain.richWorkspaceText == nil || self.activeMain.richWorkspaceText.count == 0)) && !isEncrypted {
|
|
|
actions.append(
|
|
|
NCMenuAction(
|
|
|
title: NSLocalizedString("_add_folder_info_", comment: ""),
|
|
@@ -143,7 +144,7 @@ extension AppDelegate {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if appDelegate.reachability.isReachable() && directEditingCreators != nil && directEditingCreators!.contains(where: { $0.editor == k_editor_onlyoffice && $0.identifier == k_onlyoffice_docx}) {
|
|
|
+ if appDelegate.reachability.isReachable() && directEditingCreators != nil && directEditingCreators!.contains(where: { $0.editor == k_editor_onlyoffice && $0.identifier == k_onlyoffice_docx}) && !isEncrypted {
|
|
|
let directEditingCreator = directEditingCreators!.first(where: { $0.editor == k_editor_onlyoffice && $0.identifier == k_onlyoffice_docx})!
|
|
|
actions.append(
|
|
|
NCMenuAction(
|
|
@@ -168,7 +169,7 @@ extension AppDelegate {
|
|
|
)
|
|
|
}
|
|
|
|
|
|
- if appDelegate.reachability.isReachable() && directEditingCreators != nil && directEditingCreators!.contains(where: { $0.editor == k_editor_onlyoffice && $0.identifier == k_onlyoffice_xlsx}) {
|
|
|
+ if appDelegate.reachability.isReachable() && directEditingCreators != nil && directEditingCreators!.contains(where: { $0.editor == k_editor_onlyoffice && $0.identifier == k_onlyoffice_xlsx}) && !isEncrypted {
|
|
|
let directEditingCreator = directEditingCreators!.first(where: { $0.editor == k_editor_onlyoffice && $0.identifier == k_onlyoffice_xlsx})!
|
|
|
actions.append(
|
|
|
NCMenuAction(
|
|
@@ -193,7 +194,7 @@ extension AppDelegate {
|
|
|
)
|
|
|
}
|
|
|
|
|
|
- if appDelegate.reachability.isReachable() && directEditingCreators != nil && directEditingCreators!.contains(where: { $0.editor == k_editor_onlyoffice && $0.identifier == k_onlyoffice_pptx}) {
|
|
|
+ if appDelegate.reachability.isReachable() && directEditingCreators != nil && directEditingCreators!.contains(where: { $0.editor == k_editor_onlyoffice && $0.identifier == k_onlyoffice_pptx}) && !isEncrypted {
|
|
|
let directEditingCreator = directEditingCreators!.first(where: { $0.editor == k_editor_onlyoffice && $0.identifier == k_onlyoffice_pptx})!
|
|
|
actions.append(
|
|
|
NCMenuAction(
|
|
@@ -219,7 +220,7 @@ extension AppDelegate {
|
|
|
}
|
|
|
|
|
|
if let richdocumentsMimetypes = NCManageDatabase.sharedInstance.getRichdocumentsMimetypes(account: appDelegate.activeAccount) {
|
|
|
- if richdocumentsMimetypes.count > 0 && appDelegate.reachability.isReachable() {
|
|
|
+ if richdocumentsMimetypes.count > 0 && appDelegate.reachability.isReachable() && !isEncrypted {
|
|
|
actions.append(
|
|
|
NCMenuAction(
|
|
|
title: NSLocalizedString("_create_new_document_", comment: ""),
|