소스 검색

test fix: is pushing the same view controller instance ?

marinofaggiana 4 년 전
부모
커밋
ef9657226a
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      iOSClient/Main/Collection Common/NCCollectionViewCommon.swift

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

@@ -1130,8 +1130,9 @@ extension NCCollectionViewCommon: UICollectionViewDelegate {
     }
     }
     
     
     func pushViewController(viewController: UIViewController) {
     func pushViewController(viewController: UIViewController) {
+        if pushed { return }
         
         
-        self.pushed = true
+        pushed = true
         self.navigationController?.pushViewController(viewController, animated: true)
         self.navigationController?.pushViewController(viewController, animated: true)
     }
     }