浏览代码

4.5.3

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
Marino Faggiana 2 年之前
父节点
当前提交
f2191f97f3

+ 2 - 2
Nextcloud.xcodeproj/project.pbxproj

@@ -3631,7 +3631,7 @@
 					"@executable_path/Frameworks",
 					"@executable_path/../../Frameworks",
 				);
-				MARKETING_VERSION = 4.5.2;
+				MARKETING_VERSION = 4.5.3;
 				ONLY_ACTIVE_ARCH = YES;
 				OTHER_LDFLAGS = "";
 				SDKROOT = iphoneos;
@@ -3692,7 +3692,7 @@
 					"@executable_path/Frameworks",
 					"@executable_path/../../Frameworks",
 				);
-				MARKETING_VERSION = 4.5.2;
+				MARKETING_VERSION = 4.5.3;
 				ONLY_ACTIVE_ARCH = YES;
 				OTHER_LDFLAGS = "";
 				SDKROOT = iphoneos;

+ 2 - 1
iOSClient/Data/NCManageDatabase.swift

@@ -86,11 +86,12 @@ class NCManageDatabase: NSObject {
 
                 migrationBlock: { migration, oldSchemaVersion in
 
-                    if oldSchemaVersion < 254 {
+                    if oldSchemaVersion < 255 {
                         migration.deleteData(forType: tableActivity.className())
                         migration.deleteData(forType: tableActivityLatestId.className())
                         migration.deleteData(forType: tableActivityPreview.className())
                         migration.deleteData(forType: tableActivitySubjectRich.className())
+                        migration.deleteData(forType: tableDirectory.className())
                         migration.deleteData(forType: tableMetadata.className())
                     }
 

+ 1 - 1
iOSClient/NCGlobal.swift

@@ -116,7 +116,7 @@ class NCGlobal: NSObject {
     // Database Realm
     //
     let databaseDefault                             = "nextcloud.realm"
-    let databaseSchemaVersion: UInt64               = 254
+    let databaseSchemaVersion: UInt64               = 255
 
     // Intro selector
     //

+ 6 - 1
iOSClient/Networking/NCAutoUpload.swift

@@ -34,7 +34,7 @@ class NCAutoUpload: NSObject {
 
     private var endForAssetToUpload: Bool = false
     private let appDelegate = UIApplication.shared.delegate as? AppDelegate
-    private let applicationState = UIApplication.shared.applicationState
+    private var applicationState = UIApplication.shared.applicationState
 
     // MARK: -
 
@@ -43,6 +43,7 @@ class NCAutoUpload: NSObject {
             completion(0)
             return
         }
+        applicationState = UIApplication.shared.applicationState
 
         NCAskAuthorization.shared.askAuthorizationPhotoLibrary(viewController: viewController) { hasPermission in
             guard hasPermission else {
@@ -60,6 +61,8 @@ class NCAutoUpload: NSObject {
 
     @objc func autoUploadFullPhotos(viewController: UIViewController?, log: String) {
 
+        applicationState = UIApplication.shared.applicationState
+
         NCAskAuthorization.shared.askAuthorizationPhotoLibrary(viewController: viewController) { hasPermission in
             guard hasPermission else { return }
             let error = NKError(errorCode: NCGlobal.shared.errorInternalError, errorDescription: "_create_full_upload_")
@@ -169,8 +172,10 @@ class NCAutoUpload: NSObject {
 
             self.endForAssetToUpload = true
             if selector == NCGlobal.shared.selectorUploadAutoUploadAll || self.applicationState == .active {
+                NKCommon.shared.writeLog("[INFO] Start createProcessUploads")
                 self.appDelegate?.networkingProcessUpload?.createProcessUploads(metadatas: metadatas, completion: completion)
             } else {
+                NKCommon.shared.writeLog("[INFO] Start createUploadProcessAutoUploadInBackground")
                 var metadatasForUpload: [tableMetadata] = []
                 for metadata in metadatas {
                     if NCManageDatabase.shared.getMetadata(predicate: NSPredicate(format: "account == %@ && serverUrl == %@ && fileName == %@ && session != ''", metadata.account, metadata.serverUrl, metadata.fileName)) != nil { continue }