marinofaggiana 5 năm trước cách đây
mục cha
commit
3eb4625b6c
2 tập tin đã thay đổi với 7 bổ sung4 xóa
  1. 1 0
      iOSClient/AppDelegate.m
  2. 6 4
      iOSClient/Login/NCAppConfigView.swift

+ 1 - 0
iOSClient/AppDelegate.m

@@ -289,6 +289,7 @@ PKPushRegistry *pushRegistry;
             
                 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) {

+ 6 - 4
iOSClient/Login/NCAppConfigView.swift

@@ -32,10 +32,12 @@ class NCAppConfigView: UIViewController {
 
     let appDelegate = UIApplication.shared.delegate as! AppDelegate
 
-    @objc var serverUrl: String?
-    @objc var username: String?
-    @objc var password: String?
+    private var serverUrl: String?
+    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!
@@ -92,7 +94,7 @@ class NCAppConfigView: UIViewController {
                     }
                     
                     self.appDelegate.settingActiveAccount(account, activeUrl: serverUrl, activeUser: username, activeUserID: tableAccount.userID, activePassword: token!)
-                    self.delegate?.loginSuccess(NSInteger(k_login_Add_Forced))
+                    self.delegate?.loginSuccess(NSInteger(self.loginType))
                     
                     self.dismiss(animated: true) {}
                 } else {