Marino Faggiana 7 жил өмнө
parent
commit
87cb76fc74

+ 1 - 1
iOSClient/AppDelegate.m

@@ -359,7 +359,7 @@
             
             
         if (loginWeb) {
         if (loginWeb) {
             
             
-            if (!_activeLoginWeb.view.window) {
+            if (_activeLoginWeb == nil) {
                 
                 
                 _activeLoginWeb = [CCLoginWeb new];
                 _activeLoginWeb = [CCLoginWeb new];
                 _activeLoginWeb.delegate = delegate;
                 _activeLoginWeb.delegate = delegate;

+ 6 - 2
iOSClient/Library/SwiftWebVC/SwiftModalWebVC.swift

@@ -12,6 +12,7 @@ public protocol SwiftModalWebVCDelegate: class {
     func didStartLoading()
     func didStartLoading()
     func didReceiveServerRedirectForProvisionalNavigation(url: URL)
     func didReceiveServerRedirectForProvisionalNavigation(url: URL)
     func didFinishLoading(success: Bool, url: URL)
     func didFinishLoading(success: Bool, url: URL)
+    func loginDisappear()
 }
 }
 
 
 public class SwiftModalWebVC: UINavigationController {
 public class SwiftModalWebVC: UINavigationController {
@@ -93,8 +94,6 @@ public class SwiftModalWebVC: UINavigationController {
             }
             }
         }
         }
         webViewController.delegate = self
         webViewController.delegate = self
-        
-        
     }
     }
     
     
     override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {
     override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {
@@ -108,6 +107,11 @@ public class SwiftModalWebVC: UINavigationController {
     override public func viewWillAppear(_ animated: Bool) {
     override public func viewWillAppear(_ animated: Bool) {
         super.viewWillAppear(false)
         super.viewWillAppear(false)
     }
     }
+    
+    public override func viewDidDisappear(_ animated: Bool) {
+        super.viewDidDisappear(animated)
+        self.delegateWeb?.loginDisappear()
+    }
 }
 }
 
 
 extension SwiftModalWebVC: SwiftWebVCDelegate {
 extension SwiftModalWebVC: SwiftWebVCDelegate {

+ 1 - 4
iOSClient/Login/CCLoginWeb.swift

@@ -43,7 +43,6 @@ public class CCLoginWeb: UIViewController {
         webVC.delegateWeb = self
         webVC.delegateWeb = self
 
 
         vc.present(webVC, animated: false, completion: nil)
         vc.present(webVC, animated: false, completion: nil)
-        
     }
     }
 }
 }
 
 
@@ -108,9 +107,7 @@ extension CCLoginWeb: SwiftModalWebVCDelegate {
         print("Finished loading. Success: \(success).")
         print("Finished loading. Success: \(success).")
     }
     }
     
     
-    public override func viewDidDisappear(_ animated: Bool) {
-        super.viewDidDisappear(animated)
-        
+    public func loginDisappear() {
         self.delegate?.loginDisappear()
         self.delegate?.loginDisappear()
     }
     }
 }
 }

+ 1 - 0
iOSClient/Main/CCMain.m

@@ -942,6 +942,7 @@
 - (void)loginDisappear
 - (void)loginDisappear
 {
 {
     appDelegate.activeLogin = nil;
     appDelegate.activeLogin = nil;
+    appDelegate.activeLoginWeb = nil;
 }
 }
 
 
 #pragma mark -
 #pragma mark -

+ 2 - 1
iOSClient/Main/CCMore.swift

@@ -393,7 +393,8 @@ class CCMore: UIViewController, UITableViewDelegate, UITableViewDataSource, CCLo
     }
     }
     
     
     func loginDisappear() {
     func loginDisappear() {
-        
+        appDelegate.activeLogin = nil
+        appDelegate.activeLoginWeb = nil
     }
     }
 }
 }
 
 

+ 1 - 0
iOSClient/Main/CCSplit.m

@@ -199,6 +199,7 @@
 - (void)loginDisappear
 - (void)loginDisappear
 {
 {
     appDelegate.activeLogin = nil;
     appDelegate.activeLogin = nil;
+    appDelegate.activeLoginWeb = nil;
 }
 }
 
 
 #pragma --------------------------------------------------------------------------------------------
 #pragma --------------------------------------------------------------------------------------------

+ 1 - 0
iOSClient/Settings/CCManageAccount.m

@@ -198,6 +198,7 @@
 - (void)loginDisappear
 - (void)loginDisappear
 {
 {
     appDelegate.activeLogin = nil;
     appDelegate.activeLogin = nil;
+    appDelegate.activeLoginWeb = nil;
 }
 }
 
 
 #pragma --------------------------------------------------------------------------------------------
 #pragma --------------------------------------------------------------------------------------------