         
         tableView.reloadData()
         FirebaseHelper.sharedInstance().addObserverForNewPosts()
+        ActivityIndicator.sharedInstance().startActivityIndicator(self)
     }
     
     override func viewWillDisappear(_ animated: Bool) {

        return cell
    }
    
    // MARK: - Post Data Source
    
    func newPostAdded(newPost: Post) {
        posts.append(newPost)
        tableView.reloadData()
    }

    }
    
    @IBAction func logoutUser(_ sender: Any) {
        ActivityIndicator.sharedInstance().startActivityIndicator(self)
        FirebaseHelper.sharedInstance().signOutUser { (error) in
            performUIUpdatesOnMain {
                ActivityIndicator.sharedInstance().stopActivityIndicator(self)
                if error == nil {
                    self.dismiss(animated: true, completion: nil)
                    let vc = self.storyboard?.instantiateViewController(withIdentifier: "LoginSignupVC")
                    self.present(vc!, animated: true, completion: nil)
                } else {
                    self.showAlert("Error", error!.localizedDescription)
                }
            }
        }
    }
