Browse Source

update library

marinofaggiana 4 years ago
parent
commit
32aef69850

+ 2 - 2
Nextcloud.xcodeproj/project.pbxproj

@@ -2845,7 +2845,7 @@
 			repositoryURL = "https://github.com/realm/realm-cocoa";
 			requirement = {
 				kind = exactVersion;
-				version = 5.4.8;
+				version = 10.1.4;
 			};
 		};
 		F786D58B253454BF00E3DD7B /* XCRemoteSwiftPackageReference "ios-communication-library" */ = {
@@ -2853,7 +2853,7 @@
 			repositoryURL = "https://github.com/nextcloud/ios-communication-library/";
 			requirement = {
 				kind = revision;
-				revision = 15c91936f386a5054e79eb803d75f6e383f142ae;
+				revision = 4bac6345e840b0cf1dc52fdbfb8a2132e15f4758;
 			};
 		};
 		F7C4D88B2534887E00C142DA /* XCRemoteSwiftPackageReference "Parchment" */ = {

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

@@ -15,7 +15,7 @@
         "repositoryURL": "https://github.com/nextcloud/ios-communication-library/",
         "state": {
           "branch": null,
-          "revision": "15c91936f386a5054e79eb803d75f6e383f142ae",
+          "revision": "4bac6345e840b0cf1dc52fdbfb8a2132e15f4758",
           "version": null
         }
       },
@@ -33,8 +33,8 @@
         "repositoryURL": "https://github.com/realm/realm-cocoa",
         "state": {
           "branch": null,
-          "revision": "96d5d28f9fd35bd5b109da376bfdc3194cd2794a",
-          "version": "5.4.8"
+          "revision": "a4c647a5b2705591bf9472aed46786d00b71ea2b",
+          "version": "10.1.4"
         }
       },
       {
@@ -42,8 +42,8 @@
         "repositoryURL": "https://github.com/realm/realm-core",
         "state": {
           "branch": null,
-          "revision": "612057010f5521d41559970306054f4c5b12632a",
-          "version": "6.1.4"
+          "revision": "596fe8985a2bcdf3c6ecb0a7a8712b9ac5480c79",
+          "version": "10.1.3"
         }
       },
       {

+ 1 - 1
iOSClient/AppDelegate.m

@@ -263,7 +263,7 @@
     [CCUtility setCertificateError:self.account error:NO];
     
     // Setting Theming
-    [[NCBrandColor sharedInstance] settingThemingColor];
+    [[NCBrandColor sharedInstance] settingThemingColorWithAccount:self.account];
     
     // close detail
     [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:k_notificationCenter_menuDetailClose object:nil];

+ 4 - 5
iOSClient/Brand/NCBrand.swift

@@ -155,19 +155,18 @@ class NCBrandColor: NSObject {
     }
     
 #if !EXTENSION
-    @objc public func settingThemingColor() {
+    @objc public func settingThemingColor(account: String) {
         
-        let appDelegate = UIApplication.shared.delegate as! AppDelegate
         let darker: CGFloat = 30    // %
         let lighter: CGFloat = 30   // %
 
         if NCBrandOptions.sharedInstance.use_themingColor {
             
-            let themingColor = NCManageDatabase.sharedInstance.getCapabilitiesServerString(account: appDelegate.account, elements: NCElementsJSON.shared.capabilitiesThemingColor)
+            let themingColor = NCManageDatabase.sharedInstance.getCapabilitiesServerString(account: account, elements: NCElementsJSON.shared.capabilitiesThemingColor)
             
-            let themingColorElement = NCManageDatabase.sharedInstance.getCapabilitiesServerString(account: appDelegate.account, elements: NCElementsJSON.shared.capabilitiesThemingColorElement)
+            let themingColorElement = NCManageDatabase.sharedInstance.getCapabilitiesServerString(account: account, elements: NCElementsJSON.shared.capabilitiesThemingColorElement)
             
-            let themingColorText = NCManageDatabase.sharedInstance.getCapabilitiesServerString(account: appDelegate.account, elements: NCElementsJSON.shared.capabilitiesThemingColorText)
+            let themingColorText = NCManageDatabase.sharedInstance.getCapabilitiesServerString(account: account, elements: NCElementsJSON.shared.capabilitiesThemingColorText)
             
             CCGraphics.settingThemingColor(themingColor, themingColorElement: themingColorElement, themingColorText: themingColorText)
                         

+ 1 - 1
iOSClient/Main/NCMainTabBar.swift

@@ -52,7 +52,7 @@ class NCMainTabBar: UITabBar {
                     CCUtility.setDarkMode(false)
                 }
             }
-            NCBrandColor.sharedInstance.settingThemingColor()
+            NCBrandColor.sharedInstance.settingThemingColor(account: appDelegate.account)
         }
     }
     

+ 3 - 3
iOSClient/Networking/NCService.swift

@@ -162,7 +162,7 @@ class NCService: NSObject {
                     self.appDelegate.settingSetupCommunication(account)
                 
                     // Theming
-                    NCBrandColor.sharedInstance.settingThemingColor()
+                    NCBrandColor.sharedInstance.settingThemingColor(account: account)
                 
                     // File Sharing
                     let isFilesSharingEnabled = NCManageDatabase.sharedInstance.getCapabilitiesServerBool(account: account, elements: NCElementsJSON.shared.capabilitiesFileSharingApiEnabled, exists: false)
@@ -244,14 +244,14 @@ class NCService: NSObject {
                 
             } else if errorCode != 0 {
                 
-                NCBrandColor.sharedInstance.settingThemingColor()
+                NCBrandColor.sharedInstance.settingThemingColor(account: account)
                 
                 if errorCode == 401 || errorCode == 403 {
                     NCNetworkingCheckRemoteUser.shared.checkRemoteUser(account: account)
                 }
                 
             } else {
-                NCBrandColor.sharedInstance.settingThemingColor()
+                NCBrandColor.sharedInstance.settingThemingColor(account: account)
             }
         }
     }

+ 10 - 0
iOSClient/UserStatus/NCUserStatus.swift

@@ -8,6 +8,7 @@
 
 import SwiftUI
 import Foundation
+import NCCommunication
 
 @available(iOS 13.0, *)
 struct NCUserStatus: View {
@@ -44,6 +45,15 @@ struct NCUserStatus_Previews: PreviewProvider {
 @objc class NCUserStatusViewController: NSObject {
  
     @objc func makeUserStatusUI() -> UIViewController{
+        
+        NCCommunication.shared.getUserStatusPredefinedStatuses { (account, status, errorCode, errorDescription) in
+            
+        }
+        
+        NCCommunication.shared.getUserStatusRetrieveStatuses(limit: 1000, offset: 0, customUserAgent: nil, addCustomHeaders: nil) { (a, b, c, d) in
+            
+        }
+        
         let userStatus = NCUserStatus()
         //details.shipName = name
         return UIHostingController(rootView: userStatus)