     @IBAction func refresh(sender: UIRefreshControl?) {
         PartiesManager.sharedInstance.load() { [weak self] in
             self?.reloadData()
+            self?.tableView.reloadData()
             sender?.endRefreshing()
         }
     }

            tableView.scrollEnabled = true
        } else {
            var pparties = [[Party]]()
            for p in parties {
                let filteredP = p.filter({ $0.isGoing })
                if filteredP.count > 0 {
                    pparties.append(filteredP)


    @IBAction func updateSegment(sender: UISegmentedControl) {
        reloadData()
        tableView.reloadData()
        let userDefaults = NSUserDefaults.standardUserDefaults()
        userDefaults.setInteger(sender.selectedSegmentIndex, forKey: "selectedSegmentIndex")
        userDefaults.synchronize()
