     var titleLabel: UILabel!
     var closeSearchButton: UIButton!
     var emptyTableView: EmptyTableView!
+    var currentSearchString = ""
     
     override func viewDidLoad() {
         super.viewDidLoad()

            hud?.showInView(self.view, animated: true)
        }
        
        Event.listWithOptionsAndCompletion(filters) { (events, error) -> () in
            if events != nil {
                self.removeEmptyListView()

        self.removeEmptyListView()
        switch(control.selectedSegmentIndex) {
        case 1:
            currentSearchString = "admin"
            if let currentUser = User.currentUser() {
                refreshAdminEventsList(true)
            } else {
                presentAuthModal()
            }
        case 2:
            currentSearchString = "join"
            if let currentUser = User.currentUser() {
                refreshJoinEventsList(true)
            } else {
                presentAuthModal()
            }
        default:
            currentSearchString = ""
            refreshLatestEventsList(true)
        }
    }
    
