Ver Fonte

add Logout Web

Marino Faggiana há 7 anos atrás
pai
commit
63741c8cdf
2 ficheiros alterados com 15 adições e 3 exclusões
  1. 15 2
      iOSClient/Main/CCMore.swift
  2. 0 1
      iOSClient/Settings/CCManageAccount.h

+ 15 - 2
iOSClient/Main/CCMore.swift

@@ -24,7 +24,7 @@
 
 import UIKit
 
-class CCMore: UIViewController, UITableViewDelegate, UITableViewDataSource {
+class CCMore: UIViewController, UITableViewDelegate, UITableViewDataSource, CCLoginDelegate {
 
     @IBOutlet weak var themingBackground: UIImageView!
     @IBOutlet weak var themingAvatar: UIImageView!
@@ -43,6 +43,8 @@ class CCMore: UIViewController, UITableViewDelegate, UITableViewDataSource {
     var menuExternalSite: [tableExternalSites]?
     var tabAccount : tableAccount?
     
+    var loginWeb : CCLoginWeb!
+
     override func viewDidLoad() {
         
         super.viewDidLoad()
@@ -362,7 +364,12 @@ class CCMore: UIViewController, UITableViewDelegate, UITableViewDataSource {
                 
                 let manageAccount = CCManageAccount()
                 manageAccount.delete(self.appDelegate.activeAccount)
-                manageAccount.addFoced()
+                
+                self.loginWeb = CCLoginWeb()
+                self.loginWeb.delegate = self
+                self.loginWeb.loginType = loginAddForced
+                
+                self.loginWeb.presentModalWithDefaultTheme(self)
             }
             
             let actionNo = UIAlertAction(title: NSLocalizedString("_no_delete_", comment: ""), style: .default) { (action:UIAlertAction) in
@@ -402,6 +409,12 @@ class CCMore: UIViewController, UITableViewDelegate, UITableViewDataSource {
         self.navigationController?.pushViewController(controller, animated: true)
     }
 
+    func loginSuccess(_ loginType: NSInteger) {
+        
+        NotificationCenter.default.post(name: NSNotification.Name(rawValue: "initializeMain"), object: nil)
+        
+        appDelegate.selectedTabBarController(Int(k_tabBarApplicationIndexFile))
+    }
 }
 
 class CCCellMore: UITableViewCell {

+ 0 - 1
iOSClient/Settings/CCManageAccount.h

@@ -30,6 +30,5 @@
 @interface CCManageAccount : XLFormViewController <CCLoginDelegate>
 
 - (void)deleteAccount:(NSString *)account;
-- (void)addAccountFoced;
 
 @end