marinofaggiana 4 жил өмнө
parent
commit
8a6e653679

+ 3 - 1
iOSClient/AppDelegate.swift

@@ -608,11 +608,13 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
     
     func requestAccount() {
               
-        guard let accounts = NCManageDatabase.shared.getAccounts() else { return }
+        let accounts = NCManageDatabase.shared.getAllAccount()
         
         if CCUtility.getAccountRequest() && accounts.count > 1 {
             
             if let vcAccountRequest = UIStoryboard(name: "NCAccountRequest", bundle: nil).instantiateInitialViewController() as? NCAccountRequest {
+               
+                vcAccountRequest.accounts = accounts
                 
                 let popup = NCPopupViewController(contentController: vcAccountRequest, popupWidth: 300, popupHeight: 360)
                 popup.backgroundAlpha = 0.8

+ 2 - 0
iOSClient/Main/Account Request/NCAccountRequest.swift

@@ -29,6 +29,8 @@ class NCAccountRequest: UIViewController {
     @IBOutlet weak var titleLabel: UILabel!
     @IBOutlet weak var tableView: UITableView!
     @IBOutlet weak var okButton: UIButton!
+    
+    var accounts: [tableAccount] = []
 
     // MARK: - Life Cycle