Marino Faggiana 7 жил өмнө
parent
commit
778b652680

+ 2 - 2
iOSClient/AppDelegate.m

@@ -246,8 +246,8 @@
     if (self.activeAccount.length == 0 || self.maintenanceMode)
     if (self.activeAccount.length == 0 || self.maintenanceMode)
         return;
         return;
     
     
-    NSLog(@"[LOG] Request Server Capabilities");
-    [_activeMain requestServerCapabilities];
+    NSLog(@"[LOG] Request Service Server Nextcloud");
+    [[NCService sharedInstance] startRequestServicesServer];
     
     
     NSLog(@"[LOG] Initialize Auto upload");
     NSLog(@"[LOG] Initialize Auto upload");
     [[NCAutoUpload sharedInstance] initStateAutoUpload];    
     [[NCAutoUpload sharedInstance] initStateAutoUpload];    

+ 1 - 1
iOSClient/Brand/Picker.plist

@@ -19,7 +19,7 @@
 	<key>CFBundleShortVersionString</key>
 	<key>CFBundleShortVersionString</key>
 	<string>2.20.6</string>
 	<string>2.20.6</string>
 	<key>CFBundleVersion</key>
 	<key>CFBundleVersion</key>
-	<string>00004</string>
+	<string>00005</string>
 	<key>NSAppTransportSecurity</key>
 	<key>NSAppTransportSecurity</key>
 	<dict>
 	<dict>
 		<key>NSAllowsArbitraryLoads</key>
 		<key>NSAllowsArbitraryLoads</key>

+ 1 - 1
iOSClient/Brand/PickerFileProvider.plist

@@ -19,7 +19,7 @@
 	<key>CFBundleShortVersionString</key>
 	<key>CFBundleShortVersionString</key>
 	<string>2.20.6</string>
 	<string>2.20.6</string>
 	<key>CFBundleVersion</key>
 	<key>CFBundleVersion</key>
-	<string>00004</string>
+	<string>00005</string>
 	<key>NSExtension</key>
 	<key>NSExtension</key>
 	<dict>
 	<dict>
 		<key>NSExtensionFileProviderDocumentGroup</key>
 		<key>NSExtensionFileProviderDocumentGroup</key>

+ 1 - 1
iOSClient/Brand/Share.plist

@@ -19,7 +19,7 @@
 	<key>CFBundleShortVersionString</key>
 	<key>CFBundleShortVersionString</key>
 	<string>2.20.6</string>
 	<string>2.20.6</string>
 	<key>CFBundleVersion</key>
 	<key>CFBundleVersion</key>
-	<string>00004</string>
+	<string>00005</string>
 	<key>NSAppTransportSecurity</key>
 	<key>NSAppTransportSecurity</key>
 	<dict>
 	<dict>
 		<key>NSAllowsArbitraryLoads</key>
 		<key>NSAllowsArbitraryLoads</key>

+ 1 - 1
iOSClient/Brand/iOSClient.plist

@@ -69,7 +69,7 @@
 		</dict>
 		</dict>
 	</array>
 	</array>
 	<key>CFBundleVersion</key>
 	<key>CFBundleVersion</key>
-	<string>00004</string>
+	<string>00005</string>
 	<key>Fabric</key>
 	<key>Fabric</key>
 	<dict>
 	<dict>
 		<key>APIKey</key>
 		<key>APIKey</key>

+ 0 - 2
iOSClient/Main/CCMain.h

@@ -85,8 +85,6 @@
 - (void)reloadDatasource;
 - (void)reloadDatasource;
 - (void)reloadDatasource:(NSString *)serverUrl;
 - (void)reloadDatasource:(NSString *)serverUrl;
 
 
-- (void)requestServerCapabilities;
-
 - (void)openWindowShare:(tableMetadata *)metadata;
 - (void)openWindowShare:(tableMetadata *)metadata;
 - (void)clearDateReadDataSource:(NSNotification *)notification;
 - (void)clearDateReadDataSource:(NSNotification *)notification;
 - (void)cancelSearchBar;
 - (void)cancelSearchBar;

+ 18 - 182
iOSClient/Main/CCMain.m

@@ -389,8 +389,8 @@
         }
         }
         [[NCAutoUpload sharedInstance] initStateAutoUpload];
         [[NCAutoUpload sharedInstance] initStateAutoUpload];
         
         
-        NSLog(@"[LOG] Request Server Capabilities");
-        [self requestServerCapabilities];
+        NSLog(@"[LOG] Request Service Server Nextcloud");
+        [[NCService sharedInstance] startRequestServicesServer];
         
         
         // Clear datasorce
         // Clear datasorce
         [appDelegate.activePhotos reloadDatasource];
         [appDelegate.activePhotos reloadDatasource];
@@ -916,6 +916,22 @@
     [self tableViewSelect:NO];
     [self tableViewSelect:NO];
 }
 }
 
 
+#pragma --------------------------------------------------------------------------------------------
+#pragma mark ==== View Notification  ====
+#pragma --------------------------------------------------------------------------------------------
+
+- (void)viewNotification
+{
+    if ([appDelegate.listOfNotifications count] > 0) {
+        
+        CCNotification *notificationVC = [[UIStoryboard storyboardWithName:@"CCNotification" bundle:nil] instantiateViewControllerWithIdentifier:@"CCNotification"];
+        
+        [notificationVC setModalPresentationStyle:UIModalPresentationFormSheet];
+        
+        [self presentViewController:notificationVC animated:YES completion:nil];
+    }
+}
+
 #pragma --------------------------------------------------------------------------------------------
 #pragma --------------------------------------------------------------------------------------------
 #pragma mark === Delegate Login ===
 #pragma mark === Delegate Login ===
 #pragma --------------------------------------------------------------------------------------------
 #pragma --------------------------------------------------------------------------------------------
@@ -978,186 +994,6 @@
     [self tableView:self.tableView didSelectRowAtIndexPath:indexPath];
     [self tableView:self.tableView didSelectRowAtIndexPath:indexPath];
 }
 }
 
 
-#pragma mark -
-
-#pragma --------------------------------------------------------------------------------------------
-#pragma mark ==== Notification  ====
-#pragma --------------------------------------------------------------------------------------------
-
-- (void)getNotificationServerSuccessFailure:(CCMetadataNet *)metadataNet listOfNotifications:(NSArray *)listOfNotifications message:(NSString *)message errorCode:(NSInteger)errorCode
-{
-    // Check Active Account
-    if (![metadataNet.account isEqualToString:appDelegate.activeAccount])
-        return;
-    
-    if (errorCode == 0) {
-    
-        dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0), ^{
-            
-            // Order by date
-            NSArray *sortedListOfNotifications = [listOfNotifications sortedArrayUsingComparator:^NSComparisonResult(id obj1, id obj2) {
-                
-                OCNotifications *notification1 = obj1, *notification2 = obj2;
-            
-                return [notification2.date compare: notification1.date];
-            
-            }];
-        
-            // verify if listOfNotifications is changed
-            NSString *old = @"", *new = @"";
-            for (OCNotifications *notification in listOfNotifications)
-                new = [new stringByAppendingString:@(notification.idNotification).stringValue];
-            for (OCNotifications *notification in appDelegate.listOfNotifications)
-                old = [old stringByAppendingString:@(notification.idNotification).stringValue];
-
-            if (![new isEqualToString:old]) {
-            
-                appDelegate.listOfNotifications = [[NSMutableArray alloc] initWithArray:sortedListOfNotifications];
-            
-                // reload Notification view
-                [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"notificationReloadData" object:nil];
-            }
-        
-            // Update NavigationBar
-            if (!_isSelectedMode) {
-                
-                [self performSelectorOnMainThread:@selector(setUINavigationBarDefault) withObject:nil waitUntilDone:NO];
-            }
-        });
-        
-    } else {
-        
-        NSString *error = [NSString stringWithFormat:@"Get Notification Server failure error %d, %@", (int)errorCode, message];
-        NSLog(@"[LOG] %@", error);
-        
-        [[NCManageDatabase sharedInstance] addActivityClient:@"" fileID:@"" action:k_activityDebugActionCapabilities selector:@"Get Notification Server" note:error type:k_activityTypeFailure verbose:k_activityVerboseHigh activeUrl:appDelegate.activeUrl];
-        
-        // Update NavigationBar
-        if (!_isSelectedMode)
-            [self setUINavigationBarDefault];
-    }
-}
-
-- (void)viewNotification
-{
-    if ([appDelegate.listOfNotifications count] > 0) {
-        
-        CCNotification *notificationVC = [[UIStoryboard storyboardWithName:@"CCNotification" bundle:nil] instantiateViewControllerWithIdentifier:@"CCNotification"];
-        
-        [notificationVC setModalPresentationStyle:UIModalPresentationFormSheet];
-
-        [self presentViewController:notificationVC animated:YES completion:nil];
-    }
-}
-
-#pragma --------------------------------------------------------------------------------------------
-#pragma mark ==== Capabilities  ====
-#pragma --------------------------------------------------------------------------------------------
-
-- (void)getCapabilitiesOfServerSuccessFailure:(CCMetadataNet *)metadataNet capabilities:(OCCapabilities *)capabilities message:(NSString *)message errorCode:(NSInteger)errorCode
-{
-    // Check Active Account
-    if (![metadataNet.account isEqualToString:appDelegate.activeAccount])
-        return;
-    
-    if (errorCode == 0) {
-    
-        // Update capabilities db
-        [[NCManageDatabase sharedInstance] addCapabilities:capabilities];
-    
-        // ------ THEMING -----------------------------------------------------------------------
-    
-        // Download Theming Background & Change Theming color
-        dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0), ^{
-        
-            if ([NCBrandOptions sharedInstance].use_themingBackground == YES) {
-        
-                //UIImage *themingBackground = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:[capabilities.themingBackground stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]]]; DEPRECATED iOS9
-                UIImage *themingBackground = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:[capabilities.themingBackground stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLFragmentAllowedCharacterSet]]]]];
-                if (themingBackground) {
-                    dispatch_async(dispatch_get_main_queue(), ^{
-                        [UIImagePNGRepresentation(themingBackground) writeToFile:[NSString stringWithFormat:@"%@/themingBackground.png", appDelegate.directoryUser] atomically:YES];
-                    });
-                } else {
-                    [[NSFileManager defaultManager] removeItemAtPath:[NSString stringWithFormat:@"%@/themingBackground.png", appDelegate.directoryUser] error:nil];
-                }
-            }
-        
-            dispatch_async(dispatch_get_main_queue(), ^{
-                [appDelegate settingThemingColorBrand];
-            });
-        });
-
-        // ------ SEARCH  -----------------------------------------------------------------------
-        
-        // Search bar if change version
-        if ([[NCManageDatabase sharedInstance] getServerVersion] != capabilities.versionMajor) {
-        
-            [self cancelSearchBar];
-        }
-        
-        // ------ GET SERVICE SERVER ------------------------------------------------------------
-        
-        // Read User Profile
-        metadataNet.action = actionGetUserProfile;
-        [appDelegate addNetworkingOperationQueue:appDelegate.netQueue delegate:NCService.sharedInstance metadataNet:metadataNet];
-        
-        // Read External Sites
-        if (capabilities.isExternalSitesServerEnabled) {
-            
-            metadataNet.action = actionGetExternalSitesServer;
-            [appDelegate addNetworkingOperationQueue:appDelegate.netQueue delegate:NCService.sharedInstance metadataNet:metadataNet];
-        }
-        
-        // Read Share
-        if (capabilities.isFilesSharingAPIEnabled) {
-            
-            [appDelegate.sharesID removeAllObjects];
-            metadataNet.action = actionReadShareServer;
-            [appDelegate addNetworkingOperationQueue:appDelegate.netQueue delegate:self metadataNet:metadataNet];
-        }
-        
-        // Read Notification
-        metadataNet.action = actionGetNotificationServer;
-        [appDelegate addNetworkingOperationQueue:appDelegate.netQueue delegate:NCService.sharedInstance metadataNet:metadataNet];
-        
-        // Read Activity
-        metadataNet.action = actionGetActivityServer;
-        [appDelegate addNetworkingOperationQueue:appDelegate.netQueue delegate:NCService.sharedInstance metadataNet:metadataNet];
-        
-    } else {
-      
-        // Unauthorized
-        if (errorCode == kOCErrorServerUnauthorized)
-            [appDelegate openLoginView:self loginType:loginModifyPasswordUser];
-        
-        NSString *error = [NSString stringWithFormat:@"Get Capabilities failure error %d, %@", (int)errorCode, message];
-        NSLog(@"[LOG] %@", error);
-        
-        [[NCManageDatabase sharedInstance] addActivityClient:@"" fileID:@"" action:k_activityDebugActionCapabilities selector:@"Get Capabilities of Server" note:error type:k_activityTypeFailure verbose:k_activityVerboseHigh activeUrl:appDelegate.activeUrl];
-        
-        // Change Theming color
-        [appDelegate settingThemingColorBrand];
-    }
-}
-
-#pragma mark -
-#pragma --------------------------------------------------------------------------------------------
-#pragma mark ==== Request Server Information  ====
-#pragma --------------------------------------------------------------------------------------------
-
-- (void)requestServerCapabilities
-{
-    // test
-    if (appDelegate.activeAccount.length == 0 || appDelegate.maintenanceMode)
-        return;
-    
-    CCMetadataNet *metadataNet = [[CCMetadataNet alloc] initWithAccount:appDelegate.activeAccount];
-    
-    metadataNet.action = actionGetCapabilities;
-    [appDelegate addNetworkingOperationQueue:appDelegate.netQueue delegate:self metadataNet:metadataNet];
-}
-
 #pragma mark -
 #pragma mark -
 #pragma --------------------------------------------------------------------------------------------
 #pragma --------------------------------------------------------------------------------------------
 #pragma mark ==== Download Thumbnail Delegate ====
 #pragma mark ==== Download Thumbnail Delegate ====

+ 122 - 28
iOSClient/Networking/NCService.swift

@@ -32,10 +32,80 @@ class NCService: NSObject, OCNetworkingDelegate, CCLoginDelegate, CCLoginDelegat
         return instance
         return instance
     }()
     }()
     
     
-     @objc func middlewarePing() {
-       
+    //MARK: -
+    //MARK: Start Services API NC
+    
+    @objc func startRequestServicesServer() {
+   
+        self.requestUserProfile()
+        self.requestServerCapabilities()
+        self.requestNotificationServer()
+        self.requestActivityServer()
+    }
+
+    //MARK: -
+    //MARK: Request Service API NC
+    
+    @objc func requestServerCapabilities() {
+        
+        if (appDelegate.activeAccount == nil || appDelegate.activeAccount.count == 0 || appDelegate.maintenanceMode == true) {
+            return
+        }
+        
+        guard let metadataNet = CCMetadataNet.init(account: appDelegate.activeAccount) else {
+            return
+        }
+        
+        metadataNet.action = actionGetCapabilities
+        appDelegate.addNetworkingOperationQueue(appDelegate.netQueue, delegate: self, metadataNet: metadataNet)
+    }
+    
+    @objc func requestUserProfile() {
+        
+        if (appDelegate.activeAccount == nil || appDelegate.activeAccount.count == 0 || appDelegate.maintenanceMode == true) {
+            return
+        }
+        
+        guard let metadataNet = CCMetadataNet.init(account: appDelegate.activeAccount) else {
+            return
+        }
+        
+        metadataNet.action = actionGetUserProfile
+        appDelegate.addNetworkingOperationQueue(appDelegate.netQueue, delegate: self, metadataNet: metadataNet)
+    }
+    
+    @objc func requestNotificationServer() {
+        
+        if (appDelegate.activeAccount == nil || appDelegate.activeAccount.count == 0 || appDelegate.maintenanceMode == true) {
+            return
+        }
+        
+        guard let metadataNet = CCMetadataNet.init(account: appDelegate.activeAccount) else {
+            return
+        }
+        
+        metadataNet.action = actionGetNotificationServer
+        appDelegate.addNetworkingOperationQueue(appDelegate.netQueue, delegate: self, metadataNet: metadataNet)
+    }
+    
+    @objc func requestActivityServer() {
+        
+        if (appDelegate.activeAccount == nil || appDelegate.activeAccount.count == 0 || appDelegate.maintenanceMode == true) {
+            return
+        }
+        
+        guard let metadataNet = CCMetadataNet.init(account: appDelegate.activeAccount) else {
+            return
+        }
+        
+        metadataNet.action = actionGetActivityServer
+        appDelegate.addNetworkingOperationQueue(appDelegate.netQueue, delegate: self, metadataNet: metadataNet)
+    }
+    
+    @objc func middlewarePing() {
+        
         if (appDelegate.activeAccount == nil || appDelegate.activeAccount.count == 0 || appDelegate.maintenanceMode == true) {
         if (appDelegate.activeAccount == nil || appDelegate.activeAccount.count == 0 || appDelegate.maintenanceMode == true) {
-            return;
+            return
         }
         }
         
         
         guard let metadataNet = CCMetadataNet.init(account: appDelegate.activeAccount) else {
         guard let metadataNet = CCMetadataNet.init(account: appDelegate.activeAccount) else {
@@ -48,11 +118,14 @@ class NCService: NSObject, OCNetworkingDelegate, CCLoginDelegate, CCLoginDelegat
         //appDelegate.addNetworkingOperationQueue(appDelegate.netQueue, delegate: self, metadataNet: metadataNet)
         //appDelegate.addNetworkingOperationQueue(appDelegate.netQueue, delegate: self, metadataNet: metadataNet)
     }
     }
     
     
+    //MARK: -
+    //MARK: Delegate Service API NC
+    
     func getCapabilitiesOfServerSuccessFailure(_ metadataNet: CCMetadataNet!, capabilities: OCCapabilities?, message: String?, errorCode: Int) {
     func getCapabilitiesOfServerSuccessFailure(_ metadataNet: CCMetadataNet!, capabilities: OCCapabilities?, message: String?, errorCode: Int) {
         
         
         // Check Active Account
         // Check Active Account
         if (metadataNet.account != appDelegate.activeAccount) {
         if (metadataNet.account != appDelegate.activeAccount) {
-            return;
+            return
         }
         }
         
         
         if (errorCode == 0) {
         if (errorCode == 0) {
@@ -66,6 +139,26 @@ class NCService: NSObject, OCNetworkingDelegate, CCLoginDelegate, CCLoginDelegat
             DispatchQueue.global().async {
             DispatchQueue.global().async {
                 
                 
                 if (NCBrandOptions.sharedInstance.use_themingBackground) {
                 if (NCBrandOptions.sharedInstance.use_themingBackground) {
+                    
+                    let address = capabilities!.themingBackground!.addingPercentEncoding(withAllowedCharacters: .urlFragmentAllowed)!
+                    guard let imageData = try? Data(contentsOf: URL(string: address)!) else {
+                        return
+                    }
+                    
+                    guard let image = UIImage(data: imageData) else {
+                        let fileName = "\(self.appDelegate.directoryUser!)/themingBackground.png"
+                        try? FileManager.default.removeItem(atPath: fileName)
+                        return
+                    }
+                    
+                    if let data = UIImagePNGRepresentation(image) {
+                        let fileName = "\(self.appDelegate.directoryUser!)/themingBackground.png"
+                        try? data.write(to: URL(fileURLWithPath: fileName))
+                    }
+                    
+                    DispatchQueue.main.async {
+                        self.appDelegate.settingThemingColorBrand()
+                    }
                 }
                 }
             }
             }
             
             
@@ -76,6 +169,21 @@ class NCService: NSObject, OCNetworkingDelegate, CCLoginDelegate, CCLoginDelegat
             }
             }
             
             
             // ------ GET OTHER SERVICE -------------------------------------------------------------
             // ------ GET OTHER SERVICE -------------------------------------------------------------
+
+            // Read External Sites
+            if (capabilities!.isExternalSitesServerEnabled) {
+                
+                metadataNet.action = actionGetExternalSitesServer
+                appDelegate.addNetworkingOperationQueue(appDelegate.netQueue, delegate: self, metadataNet: metadataNet)
+            }
+            
+            // Read Share
+            if (capabilities!.isFilesSharingAPIEnabled) {
+                
+                appDelegate.sharesID.removeAllObjects()
+                metadataNet.action = actionReadShareServer
+                appDelegate.addNetworkingOperationQueue(appDelegate.netQueue, delegate: appDelegate.activeMain, metadataNet: metadataNet)
+            }
             
             
         } else {
         } else {
             
             
@@ -94,25 +202,11 @@ class NCService: NSObject, OCNetworkingDelegate, CCLoginDelegate, CCLoginDelegat
         }
         }
     }
     }
     
     
-    @objc func requestServerCapabilities() {
-        
-        if (appDelegate.activeAccount == nil || appDelegate.activeAccount.count == 0 || appDelegate.maintenanceMode == true) {
-            return;
-        }
-    
-        guard let metadataNet = CCMetadataNet.init(account: appDelegate.activeAccount) else {
-            return
-        }
-    
-        metadataNet.action = actionGetCapabilities;
-        appDelegate.addNetworkingOperationQueue(appDelegate.netQueue, delegate: self, metadataNet: metadataNet)
-    }
-    
     @objc func getUserProfileSuccessFailure(_ metadataNet: CCMetadataNet!, userProfile: OCUserProfile?, message: String?, errorCode: Int) {
     @objc func getUserProfileSuccessFailure(_ metadataNet: CCMetadataNet!, userProfile: OCUserProfile?, message: String?, errorCode: Int) {
         
         
         // Check Active Account
         // Check Active Account
         if (metadataNet.account != appDelegate.activeAccount) {
         if (metadataNet.account != appDelegate.activeAccount) {
-            return;
+            return
         }
         }
         
         
         if (errorCode == 0) {
         if (errorCode == 0) {
@@ -132,20 +226,20 @@ class NCService: NSObject, OCNetworkingDelegate, CCLoginDelegate, CCLoginDelegat
             
             
             DispatchQueue.global(qos: .default).async {
             DispatchQueue.global(qos: .default).async {
                 
                 
-                let address = "\(self.appDelegate.activeUrl!)/index.php/avatar/\(self.appDelegate.activeUser!)/128"
+                let address = "\(self.appDelegate.activeUrl!)/index.php/avatar/\(self.appDelegate.activeUser!)/128".addingPercentEncoding(withAllowedCharacters: .urlFragmentAllowed)!
                 guard let imageData = try? Data(contentsOf: URL(string: address)!) else {
                 guard let imageData = try? Data(contentsOf: URL(string: address)!) else {
                     NotificationCenter.default.post(name: NSNotification.Name(rawValue: "changeUserProfile"), object: nil)
                     NotificationCenter.default.post(name: NSNotification.Name(rawValue: "changeUserProfile"), object: nil)
                     return
                     return
                 }
                 }
                 
                 
-                guard let avatar = UIImage(data: imageData) else {
+                guard let image = UIImage(data: imageData) else {
                     let fileName = "\(self.appDelegate.directoryUser!)/avatar.png"
                     let fileName = "\(self.appDelegate.directoryUser!)/avatar.png"
                     try? FileManager.default.removeItem(atPath: fileName)
                     try? FileManager.default.removeItem(atPath: fileName)
                     NotificationCenter.default.post(name: NSNotification.Name(rawValue: "changeUserProfile"), object: nil)
                     NotificationCenter.default.post(name: NSNotification.Name(rawValue: "changeUserProfile"), object: nil)
                     return
                     return
                 }
                 }
                 
                 
-                if let data = UIImagePNGRepresentation(avatar) {
+                if let data = UIImagePNGRepresentation(image) {
                     let fileName = "\(self.appDelegate.directoryUser!)/avatar.png"
                     let fileName = "\(self.appDelegate.directoryUser!)/avatar.png"
                     try? data.write(to: URL(fileURLWithPath: fileName))
                     try? data.write(to: URL(fileURLWithPath: fileName))
                 }
                 }
@@ -166,7 +260,7 @@ class NCService: NSObject, OCNetworkingDelegate, CCLoginDelegate, CCLoginDelegat
         
         
         // Check Active Account
         // Check Active Account
         if (metadataNet.account != appDelegate.activeAccount) {
         if (metadataNet.account != appDelegate.activeAccount) {
-            return;
+            return
         }
         }
         
         
         if (errorCode == 0) {
         if (errorCode == 0) {
@@ -189,7 +283,7 @@ class NCService: NSObject, OCNetworkingDelegate, CCLoginDelegate, CCLoginDelegat
         
         
         // Check Active Account
         // Check Active Account
         if (metadataNet.account != appDelegate.activeAccount) {
         if (metadataNet.account != appDelegate.activeAccount) {
-            return;
+            return
         }
         }
         
         
         if (errorCode == 0) {
         if (errorCode == 0) {
@@ -212,7 +306,7 @@ class NCService: NSObject, OCNetworkingDelegate, CCLoginDelegate, CCLoginDelegat
     
     
         // Check Active Account
         // Check Active Account
         if (metadataNet.account != appDelegate.activeAccount) {
         if (metadataNet.account != appDelegate.activeAccount) {
-            return;
+            return
         }
         }
         
         
         if (errorCode == 0) {
         if (errorCode == 0) {
@@ -266,7 +360,7 @@ class NCService: NSObject, OCNetworkingDelegate, CCLoginDelegate, CCLoginDelegat
     }
     }
     
     
     //MARK: -
     //MARK: -
-    //MARK: Delegate : Login
+    //MARK: Delegate Login
     
     
     func loginSuccess(_ loginType: Int) {
     func loginSuccess(_ loginType: Int) {
         
         
@@ -275,11 +369,11 @@ class NCService: NSObject, OCNetworkingDelegate, CCLoginDelegate, CCLoginDelegat
     }
     }
 
 
     func loginClose() {
     func loginClose() {
-        appDelegate.activeLogin = nil;
+        appDelegate.activeLogin = nil
     }
     }
     
     
     func loginWebClose() {
     func loginWebClose() {
-        appDelegate.activeLoginWeb = nil;
+        appDelegate.activeLoginWeb = nil
     }
     }
     
     
 }
 }