marinofaggiana 4 years ago
parent
commit
2880be3977

+ 3 - 3
Nextcloud.xcodeproj/project.pbxproj

@@ -2809,15 +2809,15 @@
 			repositoryURL = "https://github.com/realm/realm-cocoa";
 			requirement = {
 				kind = exactVersion;
-				version = 10.5.0;
+				version = 10.5.1;
 			};
 		};
 		F786D58B253454BF00E3DD7B /* XCRemoteSwiftPackageReference "ios-communication-library" */ = {
 			isa = XCRemoteSwiftPackageReference;
 			repositoryURL = "https://github.com/nextcloud/ios-communication-library/";
 			requirement = {
-				kind = exactVersion;
-				version = 0.88.0;
+				kind = revision;
+				revision = 99f07a7192f566450f60f3db47ec749c60464984;
 			};
 		};
 		F7C4D88B2534887E00C142DA /* XCRemoteSwiftPackageReference "Parchment" */ = {

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

@@ -15,8 +15,8 @@
         "repositoryURL": "https://github.com/nextcloud/ios-communication-library/",
         "state": {
           "branch": null,
-          "revision": "eaac1d250efa5aa9035c953f45949bce576fb469",
-          "version": "0.88.0"
+          "revision": "99f07a7192f566450f60f3db47ec749c60464984",
+          "version": null
         }
       },
       {
@@ -33,8 +33,8 @@
         "repositoryURL": "https://github.com/realm/realm-cocoa",
         "state": {
           "branch": null,
-          "revision": "c236b2c1270fe41ba7c101a1d17ef56494987cb9",
-          "version": "10.5.0"
+          "revision": "4274b9c8ba717d7a81c953c34b715d5f587fa92f",
+          "version": "10.5.1"
         }
       },
       {
@@ -42,8 +42,8 @@
         "repositoryURL": "https://github.com/realm/realm-core",
         "state": {
           "branch": null,
-          "revision": "7390723ae39b432bd00f093ea84e3b79534a202c",
-          "version": "10.3.2"
+          "revision": "8af0f8d609491986b49f2c986e771d9dc445664d",
+          "version": "10.3.3"
         }
       },
       {

+ 1 - 21
iOSClient/Main/Colleaction Common/NCCollectionCommon.swift

@@ -448,7 +448,7 @@ class NCCollectionCommon: NSObject, NCSelectDelegate {
             let filePath = CCUtility.getDirectoryProviderStorageOcId(ocId, fileNameView: fileNameView)!
             
             if data is UIImage {
-                try (data as? UIImage)?.jpegData(compressionQuality: 1)?.write(to: URL(fileURLWithPath: filePath))
+                try (data as? UIImage)?.pngData()?.write(to: URL(fileURLWithPath: filePath))
             } else if data is Data {
                 try (data as? Data)?.write(to: URL(fileURLWithPath: filePath))
             } else if data is String {
@@ -468,26 +468,6 @@ class NCCollectionCommon: NSObject, NCSelectDelegate {
             
         } catch { }
     }
-
-    private func uploadPasteOcId(_ ocId: String, serverUrl: String) {
-        if let metadata = NCManageDatabase.shared.getMetadataFromOcId(ocId) {
-            if CCUtility.fileProviderStorageExists(metadata.ocId, fileNameView: metadata.fileNameView) {
-                let fileNameView = NCUtilityFileSystem.shared.createFileName(metadata.fileNameView, serverUrl: serverUrl, account: appDelegate.account)
-                let ocId = NSUUID().uuidString
-                
-                CCUtility.copyFile(atPath: CCUtility.getDirectoryProviderStorageOcId(metadata.ocId, fileNameView: metadata.fileNameView), toPath: CCUtility.getDirectoryProviderStorageOcId(ocId, fileNameView: fileNameView))
-                let metadataForUpload = NCManageDatabase.shared.createMetadata(account: appDelegate.account, fileName: fileNameView, ocId: ocId, serverUrl: serverUrl, urlBase: appDelegate.urlBase, url: "", contentType: "", livePhoto: false)
-                
-                metadataForUpload.session = NCNetworking.shared.sessionIdentifierBackground
-                metadataForUpload.sessionSelector = NCBrandGlobal.shared.selectorUploadFile
-                metadataForUpload.size = metadata.size
-                metadataForUpload.status = NCBrandGlobal.shared.metadataStatusWaitUpload
-                
-                NCManageDatabase.shared.addMetadata(metadataForUpload)
-            }
-        }
-    }
-
 }