marinofaggiana 4 年之前
父節點
當前提交
b5b4615a7c
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      iOSClient/Main/Collection Common/NCCollectionViewCommon.swift

+ 3 - 2
iOSClient/Main/Collection Common/NCCollectionViewCommon.swift

@@ -229,8 +229,9 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
             navigationItem.title = titleCurrentFolder
             
             // PROFILE BUTTON
+            let rootViewController = navigationController?.viewControllers.first
             
-            if layoutKey == NCGlobal.shared.layoutViewFiles {
+            if layoutKey == NCGlobal.shared.layoutViewFiles && rootViewController == self  {
             
                 let profileButton = UIButton.init(type: .custom)
                 profileButton.frame = CGRect(x: 0, y: 0, width: 30, height: 30)
@@ -653,7 +654,7 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
     @objc func profileButtonTapped(sender: Any) {
         
         let accounts = NCManageDatabase.shared.getAllAccount()
-        if accounts.count > 1 {
+        if accounts.count > 0 {
             
             if let vcAccountRequest = UIStoryboard(name: "NCAccountRequest", bundle: nil).instantiateInitialViewController() as? NCAccountRequest {