浏览代码

remove old code

marinofaggiana 5 年之前
父节点
当前提交
4e535eee4e

+ 2 - 5
iOSClient/AppDelegate.m

@@ -36,7 +36,7 @@
 
 @class NCViewerRichdocument;
 
-@interface AppDelegate () <UNUserNotificationCenterDelegate, CCLoginDelegate, NCLoginWebDelegate, NCAppConfigViewDelegate>
+@interface AppDelegate () <UNUserNotificationCenterDelegate, CCLoginDelegate, NCLoginWebDelegate>
 {
 PKPushRegistry *pushRegistry;
 }
@@ -288,10 +288,7 @@ PKPushRegistry *pushRegistry;
             if (!(_appConfigView.isViewLoaded && _appConfigView.view.window)) {
             
                 self.appConfigView = [[UIStoryboard storyboardWithName:@"CCLogin" bundle:nil] instantiateViewControllerWithIdentifier:@"NCAppConfigView"];
-            
-                self.activeLoginWeb.loginType = loginType;
-                self.appConfigView.delegate = delegate;
-                
+                            
                 dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.1 * NSEC_PER_SEC), dispatch_get_main_queue(), ^(void) {
                     [viewController presentViewController:self.appConfigView animated:YES completion:nil];
                 });

+ 1 - 9
iOSClient/Login/NCAppConfigView.swift

@@ -23,11 +23,6 @@
 
 import Foundation
 
-@objc protocol NCAppConfigViewDelegate: class {
-    func loginSuccess()
-    @objc optional func appConfigViewDismiss()
-}
-
 class NCAppConfigView: UIViewController {
 
     let appDelegate = UIApplication.shared.delegate as! AppDelegate
@@ -36,9 +31,6 @@ class NCAppConfigView: UIViewController {
     private var username: String?
     private var password: String?
     
-    @objc weak var delegate: NCAppConfigViewDelegate?
-    @objc var loginType: Int = 0
-
     @IBOutlet weak var logoImage: UIImageView!
     @IBOutlet weak var titleLabel: UILabel!
     
@@ -94,7 +86,7 @@ class NCAppConfigView: UIViewController {
                     }
                     
                     self.appDelegate.settingActiveAccount(account, activeUrl: serverUrl, activeUser: username, activeUserID: tableAccount.userID, activePassword: token!)
-                    self.delegate?.loginSuccess()
+                    NotificationCenter.default.post(name: NSNotification.Name(rawValue: "initializeMain"), object: nil, userInfo: nil)
                     
                     self.dismiss(animated: true) {}
                 } else {

+ 1 - 1
iOSClient/Main/CCMain.m

@@ -36,7 +36,7 @@
 #import "NCNetworkingEndToEnd.h"
 #import "PKDownloadButton.h"
 
-@interface CCMain () <UITextViewDelegate, createFormUploadAssetsDelegate, MGSwipeTableCellDelegate, CCLoginDelegate, NCLoginWebDelegate, NCAppConfigViewDelegate, NCSelectDelegate, UITextFieldDelegate>
+@interface CCMain () <UITextViewDelegate, createFormUploadAssetsDelegate, MGSwipeTableCellDelegate, CCLoginDelegate, NCLoginWebDelegate, NCSelectDelegate, UITextFieldDelegate>
 {
     AppDelegate *appDelegate;
         

+ 1 - 1
iOSClient/Main/CCMore.swift

@@ -24,7 +24,7 @@
 
 import UIKit
 
-class CCMore: UIViewController, UITableViewDelegate, UITableViewDataSource, CCLoginDelegate, NCLoginWebDelegate, NCAppConfigViewDelegate {
+class CCMore: UIViewController, UITableViewDelegate, UITableViewDataSource, CCLoginDelegate, NCLoginWebDelegate {
 
     @IBOutlet weak var themingBackground: UIImageView!
     @IBOutlet weak var disclosureIndicator: UIImageView!

+ 1 - 1
iOSClient/Main/CCSplit.m

@@ -27,7 +27,7 @@
 #import "NCAutoUpload.h"
 #import "NCBridgeSwift.h"
 
-@interface CCSplit () <CCLoginDelegate, NCLoginWebDelegate, NCAppConfigViewDelegate>
+@interface CCSplit () <CCLoginDelegate, NCLoginWebDelegate>
 {
     AppDelegate *appDelegate;
     BOOL prevRunningInFullScreen;

+ 1 - 1
iOSClient/Settings/CCManageAccount.m

@@ -29,7 +29,7 @@
 
 #define actionSheetCancellaAccount 1
 
-@interface CCManageAccount () <CCLoginDelegate, NCLoginWebDelegate, NCAppConfigViewDelegate>
+@interface CCManageAccount () <CCLoginDelegate, NCLoginWebDelegate>
 {
     AppDelegate *appDelegate;
 }