     fileprivate let feedbackGenerator = UISelectionFeedbackGenerator()
     fileprivate let margin: CGFloat = 0
     
+    var core = App.core
+    
+    var isPresentingOnboarding = false
+    
     let presenter: Presentr = {
         let presenter = Presentr(presentationType: .alert)
         presenter.transitionType = TransitionType.coverHorizontalFromRight


    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
        navigationController?.setNavigationBarHidden(true, animated: true)
    }
    

}


// MARK: - Subscriber

extension HomeViewController: Subscriber {
    
    func update(with state: AppState) {
        if state.userState.currentUser == nil && !isPresentingOnboarding {
            isPresentingOnboarding = true
            let usernameVC = UsernameViewController.initializeFromStoryboard().embededInNavigationController
            present(usernameVC, animated: true, completion: nil)
        }
    }
    
}

