 
     override func viewWillAppear(_ animated: Bool) {
         super.viewWillAppear(animated)
+        
+        core.add(subscriber: self)
         navigationController?.setNavigationBarHidden(true, animated: true)
     }
     

    fileprivate let feedbackGenerator = UISelectionFeedbackGenerator()
    fileprivate let margin: CGFloat = 0
    
    let presenter: Presentr = {
        let presenter = Presentr(presentationType: .alert)
        presenter.transitionType = TransitionType.coverHorizontalFromRight

}


// 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)
        }
    }
    
}

