소스 검색

Add request account

marinofaggiana 4 년 전
부모
커밋
8a6e653679
2개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      iOSClient/AppDelegate.swift
  2. 2 0
      iOSClient/Main/Account Request/NCAccountRequest.swift

+ 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