marinofaggiana 4 yıl önce
ebeveyn
işleme
10a5d05b18

+ 4 - 4
iOSClient/AppDelegate.swift

@@ -87,7 +87,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
     
     // MARK: -
 
-    @objc func openLoginView(viewController: UIViewController?, selector: Int, openLoginWeb: Bool) {
+    @objc func openLogin(viewController: UIViewController?, selector: Int, openLoginWeb: Bool) {
         
     }
 
@@ -101,7 +101,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
         
         // check unauthorized server (401)
         if CCUtility.getPasscode()?.count == 0 {
-            openLoginView(viewController: window?.rootViewController, selector: NCBrandGlobal.shared.introLogin, openLoginWeb: true)
+            openLogin(viewController: window?.rootViewController, selector: NCBrandGlobal.shared.introLogin, openLoginWeb: true)
         }
         
         // check certificate untrusted (-1202)
@@ -126,7 +126,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
     
     // MARK: -
     
-    func settingAccount(_ account: String, urlBase: String, user: String, userID: String, password: String) {
+    @objc func settingAccount(_ account: String, urlBase: String, user: String, userID: String, password: String) {
         
         self.account = account
         self.urlBase = urlBase
@@ -145,7 +145,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
         }
     }
     
-    func deleteAccount(_ account: String, wipe: Bool) {
+    @objc func deleteAccount(_ account: String, wipe: Bool) {
         
     }
 }

+ 2 - 2
iOSClient/Brand/Intro/NCIntroViewController.swift

@@ -164,11 +164,11 @@ class NCIntroViewController: UIViewController, UICollectionViewDataSource, UICol
     }
 
     @IBAction func login(_ sender: Any) {
-        appDelegate.openLoginView(viewController: navigationController, selector: NCBrandGlobal.shared.introLogin, openLoginWeb: false)
+        appDelegate.openLogin(viewController: navigationController, selector: NCBrandGlobal.shared.introLogin, openLoginWeb: false)
     }
 
     @IBAction func signup(_ sender: Any) {
-        appDelegate.openLoginView(viewController: navigationController, selector: NCBrandGlobal.shared.introSignup, openLoginWeb: false)
+        appDelegate.openLogin(viewController: navigationController, selector: NCBrandGlobal.shared.introSignup, openLoginWeb: false)
     }
 
     @IBAction func host(_ sender: Any) {

+ 1 - 1
iOSClient/More/NCMore.swift

@@ -418,7 +418,7 @@ class NCMore: UIViewController, UITableViewDelegate, UITableViewDataSource {
                 let manageAccount = CCManageAccount()
                 manageAccount.delete(self.appDelegate.account)
 
-                self.appDelegate.openLoginView(viewController:self, selector: NCBrandGlobal.shared.introLogin, openLoginWeb: false)
+                self.appDelegate.openLogin(viewController:self, selector: NCBrandGlobal.shared.introLogin, openLoginWeb: false)
             }
 
             let actionNo = UIAlertAction(title: NSLocalizedString("_no_delete_", comment: ""), style: .default) { (action: UIAlertAction) in

+ 1 - 8
iOSClient/Settings/Acknowledgements.m

@@ -22,12 +22,7 @@
 //
 
 #import "Acknowledgements.h"
-
-@interface Acknowledgements ()
-{
-    AppDelegate *appDelegate;
-}
-@end
+#import "NCBridgeSwift.h"
 
 @implementation Acknowledgements
 
@@ -35,8 +30,6 @@
 {
     [super viewDidLoad];
     
-    appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
-
     NSURL *rtfPath = [[NSBundle mainBundle]  URLForResource:@"Acknowledgements" withExtension:@"rtf"];
     
     NSAttributedString *attributedStringWithRtf = [[NSAttributedString alloc] initWithURL:rtfPath options:@{NSDocumentTypeDocumentAttribute:NSRTFTextDocumentType} documentAttributes:nil error:nil];

+ 2 - 2
iOSClient/Settings/CCManageAccount.m

@@ -330,7 +330,7 @@
     
     // Open Login
     if (accounts.count == 0) {
-        [appDelegate openLoginView:self selector:NCBrandGlobal.shared.introLogin openLoginWeb:false];
+        [appDelegate openLoginWithViewController:self selector:NCBrandGlobal.shared.introLogin openLoginWeb:false];
     }
 }
 
@@ -383,7 +383,7 @@
 {
     [self deselectFormRow:sender];
     
-    [appDelegate openLoginView:self selector:NCBrandGlobal.shared.introLogin openLoginWeb:false];
+    [appDelegate openLoginWithViewController:self selector:NCBrandGlobal.shared.introLogin openLoginWeb:false];
 }
 
 #pragma --------------------------------------------------------------------------------------------