marinofaggiana 3 жил өмнө
parent
commit
6e714328a4

+ 1 - 1
Nextcloud.xcodeproj/project.pbxproj

@@ -2913,7 +2913,7 @@
 			repositoryURL = "https://github.com/nextcloud/ios-communication-library/";
 			requirement = {
 				kind = revision;
-				revision = e652fb3f7b9cbec12f862d31b8ce47402bbca89c;
+				revision = 82b01867a0d92a8e191cb8236079ac516a0cdfea;
 			};
 		};
 		F788ECC5263AAAF900ADC67F /* XCRemoteSwiftPackageReference "MarkdownKit" */ = {

+ 1 - 1
Nextcloud.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

@@ -105,7 +105,7 @@
         "repositoryURL": "https://github.com/nextcloud/ios-communication-library/",
         "state": {
           "branch": null,
-          "revision": "e652fb3f7b9cbec12f862d31b8ce47402bbca89c",
+          "revision": "82b01867a0d92a8e191cb8236079ac516a0cdfea",
           "version": null
         }
       },

+ 18 - 5
iOSClient/Networking/NCService.swift

@@ -182,7 +182,6 @@ class NCService: NSObject {
                                 DispatchQueue.global().async {
                                 
                                     NCManageDatabase.shared.addDirectEditing(account: account, editors: editors, creators: creators)
-                                    
                                 }
                             }
                         }
@@ -222,11 +221,25 @@ class NCService: NSObject {
                         }
                     }
                 
-                    // Handwerkcloud
-                    let isHandwerkcloudEnabled = NCManageDatabase.shared.getCapabilitiesServerBool(account: account, elements: NCElementsJSON.shared.capabilitiesHWCEnabled, exists: false)
-                    if (isHandwerkcloudEnabled) {
-                        self.requestHC()
+//                    Handwerkcloud
+//                    let isHandwerkcloudEnabled = NCManageDatabase.shared.getCapabilitiesServerBool(account: account, elements: NCElementsJSON.shared.capabilitiesHWCEnabled, exists: false)
+//                    if (isHandwerkcloudEnabled) {
+//                        self.requestHC()
+//                    }
+                    
+                    // Added UTI for Collabora
+                    if let richdocumentsMimetypes = NCManageDatabase.shared.getCapabilitiesServerArray(account: account, elements: NCElementsJSON.shared.capabilitiesRichdocumentsMimetypes) {
+                        for mimeType in richdocumentsMimetypes {
+                            NCCommunicationCommon.shared.addInternalUTI(UTIString: mimeType, typeFile:  NCCommunicationCommon.typeFile.document.rawValue, iconName: NCCommunicationCommon.iconName.document.rawValue, fileName: "document")
+                        }
                     }
+                    // Added UTI for ONLYOFFICE & Text
+                    if let directEditingCreators = NCManageDatabase.shared.getDirectEditingCreators(account: account) {
+                        for directEditing in directEditingCreators {
+                            NCCommunicationCommon.shared.addInternalUTI(UTIString: directEditing.mimetype, typeFile:  NCCommunicationCommon.typeFile.document.rawValue, iconName: NCCommunicationCommon.iconName.document.rawValue, fileName: "document")
+                        }
+                    }
+
                 }
                 
             } else if errorCode != 0 {