Browse Source

remove old code

marinofaggiana 5 years ago
parent
commit
5a8c8368cf

+ 1 - 1
iOSClient/AppDelegate.m

@@ -367,7 +367,7 @@ PKPushRegistry *pushRegistry;
     }
 }
 
-- (void)loginSuccess:(NSInteger)loginType
+- (void)loginSuccess
 {
     //
 }

+ 1 - 1
iOSClient/Login/CCLogin.h

@@ -32,7 +32,7 @@
 
 @protocol CCLoginDelegate <NSObject>
 
-- (void)loginSuccess:(NSInteger)loginType;
+- (void)loginSuccess;
 
 @end
 

+ 4 - 5
iOSClient/Login/CCLogin.m

@@ -304,9 +304,9 @@
 #pragma mark === NCLoginWebDelegate ===
 #pragma --------------------------------------------------------------------------------------------
 
-- (void)loginSuccess:(NSInteger)loginType
+- (void)loginSuccess
 {
-    [self.delegate loginSuccess:_loginType];
+    [self.delegate loginSuccess];
 }
 
 - (void)loginWebDismiss
@@ -351,7 +351,6 @@
 
             if (errorCode == 0) {
                 
-                // account
                 NSString *account = [NSString stringWithFormat:@"%@ %@", user, url];
                 
                 if (_loginType == k_login_Modify_Password) {
@@ -364,7 +363,7 @@
                     // Setting appDelegate active account
                     [appDelegate settingActiveAccount:account activeUrl:tableAccount.url activeUser:tableAccount.user activeUserID:tableAccount.userID activePassword:token];
                     
-                    [self.delegate loginSuccess:_loginType];
+                    [self.delegate loginSuccess];
                     
                     [self dismissViewControllerAnimated:YES completion:nil];
                     
@@ -384,7 +383,7 @@
                     // Setting appDelegate active account
                     [appDelegate settingActiveAccount:tableAccount.account activeUrl:tableAccount.url activeUser:tableAccount.user activeUserID:tableAccount.userID activePassword:[CCUtility getPassword:tableAccount.account]];
                     
-                    [self.delegate loginSuccess:_loginType];
+                    [self.delegate loginSuccess];
                     
                     dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 1 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
                         [self dismissViewControllerAnimated:YES completion:nil];

+ 2 - 2
iOSClient/Login/NCAppConfigView.swift

@@ -24,7 +24,7 @@
 import Foundation
 
 @objc protocol NCAppConfigViewDelegate: class {
-    func loginSuccess(_: NSInteger)
+    func loginSuccess()
     @objc optional func appConfigViewDismiss()
 }
 
@@ -94,7 +94,7 @@ class NCAppConfigView: UIViewController {
                     }
                     
                     self.appDelegate.settingActiveAccount(account, activeUrl: serverUrl, activeUser: username, activeUserID: tableAccount.userID, activePassword: token!)
-                    self.delegate?.loginSuccess(NSInteger(self.loginType))
+                    self.delegate?.loginSuccess()
                     
                     self.dismiss(animated: true) {}
                 } else {

+ 3 - 3
iOSClient/Login/NCLoginWeb.swift

@@ -24,7 +24,7 @@
 import Foundation
 
 @objc protocol NCLoginWebDelegate: class {
-    func loginSuccess(_: NSInteger)
+    func loginSuccess()
     @objc optional func loginWebDismiss()
 }
 
@@ -137,7 +137,7 @@ extension NCLoginWeb: WKNavigationDelegate {
                         appDelegate.settingActiveAccount(account, activeUrl: serverUrl, activeUser: username, activeUserID: appDelegate.activeUserID, activePassword: token)
                         
                         self.dismiss(animated: true) {
-                            self.delegate?.loginSuccess(NSInteger(self.loginType))
+                            self.delegate?.loginSuccess()
                             self.delegate?.loginWebDismiss?()
                         }
                     }
@@ -164,7 +164,7 @@ extension NCLoginWeb: WKNavigationDelegate {
                         appDelegate.settingActiveAccount(account, activeUrl: serverUrl, activeUser: username, activeUserID: tableAccount.userID, activePassword: token)
                         
                         self.dismiss(animated: true) {
-                            self.delegate?.loginSuccess(NSInteger(self.loginType))
+                            self.delegate?.loginSuccess()
                             self.delegate?.loginWebDismiss?()
                         }
                     }

+ 1 - 1
iOSClient/Main/CCMain.m

@@ -919,7 +919,7 @@
 #pragma mark === Delegate Login ===
 #pragma --------------------------------------------------------------------------------------------
 
-- (void)loginSuccess:(NSInteger)loginType
+- (void)loginSuccess
 {
    [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"initializeMain" object:nil userInfo:nil];
 }

+ 1 - 1
iOSClient/Main/CCMore.swift

@@ -481,7 +481,7 @@ class CCMore: UIViewController, UITableViewDelegate, UITableViewDataSource, CCLo
         self.navigationController?.pushViewController(controller, animated: true)
     }
     
-    func loginSuccess(_ loginType: NSInteger) {
+    func loginSuccess() {
         
         NotificationCenter.default.post(name: NSNotification.Name(rawValue: "initializeMain"), object: nil, userInfo: nil)
         

+ 1 - 1
iOSClient/Main/CCSplit.m

@@ -179,7 +179,7 @@
 #pragma mark === Delegate Login ===
 #pragma --------------------------------------------------------------------------------------------
 
-- (void)loginSuccess:(NSInteger)loginType
+- (void)loginSuccess
 {
     [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"initializeMain" object:nil userInfo:nil];
 }

+ 1 - 1
iOSClient/Settings/CCManageAccount.m

@@ -392,7 +392,7 @@
 #pragma mark === Delegate Login ===
 #pragma --------------------------------------------------------------------------------------------
 
-- (void)loginSuccess:(NSInteger)loginType
+- (void)loginSuccess
 {
     [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"initializeMain" object:nil userInfo:nil];
 }