marinofaggiana 5 anni fa
parent
commit
4245435982

+ 0 - 1
iOSClient/Brand/NCBrand.swift

@@ -78,7 +78,6 @@ import UIKit
     @objc public var use_themingLogo:                   Bool = false
     @objc public var use_themingLogo:                   Bool = false
     @objc public var use_middlewarePing:                Bool = false
     @objc public var use_middlewarePing:                Bool = false
     @objc public var use_storeLocalAutoUploadAll:       Bool = false
     @objc public var use_storeLocalAutoUploadAll:       Bool = false
-    @objc public var use_imi_viewer:                    Bool = false                                                // Don't touch me !!
     @objc public var use_configuration:                 Bool = false                                                // Don't touch me !!
     @objc public var use_configuration:                 Bool = false                                                // Don't touch me !!
     
     
     @objc public var disable_intro:                     Bool = false
     @objc public var disable_intro:                     Bool = false

+ 3 - 3
iOSClient/Main/Create cloud/NCCreateMenuAdd.swift

@@ -47,9 +47,9 @@ class NCCreateMenuAdd: NSObject {
         
         
         items.append(MenuItem(title: NSLocalizedString("_upload_file_", comment: ""), value: 20, image: CCGraphics.changeThemingColorImage(UIImage.init(named: "file"), width: 50, height: 50, color: NCBrandColor.sharedInstance.icon)))
         items.append(MenuItem(title: NSLocalizedString("_upload_file_", comment: ""), value: 20, image: CCGraphics.changeThemingColorImage(UIImage.init(named: "file"), width: 50, height: 50, color: NCBrandColor.sharedInstance.icon)))
         
         
-        if NCBrandOptions.sharedInstance.use_imi_viewer {
-            items.append(MenuItem(title: NSLocalizedString("_im_create_new_file", tableName: "IMLocalizable", bundle: Bundle.main, value: "", comment: ""), value: 21, image: CCGraphics.scale(UIImage.init(named: "imagemeter"), to: CGSize(width: 25, height: 25), isAspectRation: true)))
-        }
+#if HC
+        items.append(MenuItem(title: NSLocalizedString("_im_create_new_file", tableName: "IMLocalizable", bundle: Bundle.main, value: "", comment: ""), value: 21, image: CCGraphics.scale(UIImage.init(named: "imagemeter"), to: CGSize(width: 25, height: 25), isAspectRation: true)))
+#endif
         
         
         if isNextcloudTextAvailable {
         if isNextcloudTextAvailable {
             items.append(MenuItem(title: NSLocalizedString("_create_nextcloudtext_document_", comment: ""), value: 31, image: CCGraphics.changeThemingColorImage(UIImage.init(named: "file_txt"), width: 50, height: 50, color: NCBrandColor.sharedInstance.icon)))
             items.append(MenuItem(title: NSLocalizedString("_create_nextcloudtext_document_", comment: ""), value: 31, image: CCGraphics.changeThemingColorImage(UIImage.init(named: "file_txt"), width: 50, height: 50, color: NCBrandColor.sharedInstance.icon)))

+ 10 - 10
iOSClient/Main/Menu/AppDelegate+Menu.swift

@@ -52,17 +52,17 @@ extension AppDelegate {
             )
             )
         )
         )
 
 
-        if NCBrandOptions.sharedInstance.use_imi_viewer {
-            actions.append(
-                NCMenuAction(
-                    title: NSLocalizedString("_im_create_new_file", tableName: "IMLocalizable", bundle: Bundle.main, value: "", comment: ""),
-                    icon: CCGraphics.scale(UIImage(named: "imagemeter"), to: CGSize(width: 25, height: 25), isAspectRation: true),
-                    action: { menuAction in
-                        _ = IMCreate.init(serverUrl: appDelegate.activeMain.serverUrl)
-                    }
-                )
+#if HC
+        actions.append(
+            NCMenuAction(
+                title: NSLocalizedString("_im_create_new_file", tableName: "IMLocalizable", bundle: Bundle.main, value: "", comment: ""),
+                icon: CCGraphics.scale(UIImage(named: "imagemeter"), to: CGSize(width: 25, height: 25), isAspectRation: true),
+                action: { menuAction in
+                    _ = IMCreate.init(serverUrl: appDelegate.activeMain.serverUrl)
+                }
             )
             )
-        }
+        )
+#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}) {
             let directEditingCreator = directEditingCreators!.first(where: { $0.editor == k_editor_text})!
             let directEditingCreator = directEditingCreators!.first(where: { $0.editor == k_editor_text})!

+ 0 - 5
iOSClient/Main/NCMainCommon.swift

@@ -1328,11 +1328,6 @@ class NCNetworkingMain: NSObject, CCNetworkingDelegate, IMImagemeterViewerDelega
 #if HC
 #if HC
                 if metadata.typeFile == k_metadataTypeFile_imagemeter {
                 if metadata.typeFile == k_metadataTypeFile_imagemeter {
                     
                     
-                    if NCBrandOptions.sharedInstance.use_imi_viewer == false {
-                        NCMainCommon.sharedInstance.openIn(metadata: metadata)
-                        return
-                    }
-                    
                     if !IMUtility.shared.IMUnzip(metadata: metadata) {
                     if !IMUtility.shared.IMUnzip(metadata: metadata) {
                         NCContentPresenter.shared.messageNotification("_error_", description: "Bundle imagemeter error. 🤷‍♂️", delay: TimeInterval(k_dismissAfterSecond), type: NCContentPresenter.messageType.error, errorCode: 0)
                         NCContentPresenter.shared.messageNotification("_error_", description: "Bundle imagemeter error. 🤷‍♂️", delay: TimeInterval(k_dismissAfterSecond), type: NCContentPresenter.messageType.error, errorCode: 0)
                         return
                         return

+ 1 - 1
iOSClient/Networking/CCNetworking.m

@@ -1131,7 +1131,7 @@
                 [[NCManageDatabase sharedInstance] deleteMetadataWithPredicate:[NSPredicate predicateWithFormat:@"ocId == %@", tempocId]];
                 [[NCManageDatabase sharedInstance] deleteMetadataWithPredicate:[NSPredicate predicateWithFormat:@"ocId == %@", tempocId]];
                 // IMI -> Unzip
                 // IMI -> Unzip
 #if HC
 #if HC
-                if ([metadata.typeFile isEqualToString:k_metadataTypeFile_imagemeter] && NCBrandOptions.sharedInstance.use_imi_viewer) {
+                if ([metadata.typeFile isEqualToString:k_metadataTypeFile_imagemeter]) {
                     (void)[[IMUtility shared] IMUnzipWithMetadata:metadata];
                     (void)[[IMUtility shared] IMUnzipWithMetadata:metadata];
                 }
                 }
 #endif
 #endif