Update the refresh indicator since time when coming to the foreground.

This commit is contained in:
Maurice Parker 2019-11-13 13:43:02 -06:00
parent 315ac3ee12
commit 2fd2b8b1b0
1 changed files with 5 additions and 0 deletions

View File

@ -58,6 +58,7 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner {
NotificationCenter.default.addObserver(self, selector: #selector(feedMetadataDidChange(_:)), name: .FeedMetadataDidChange, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(userDidAddFeed(_:)), name: .UserDidAddFeed, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(contentSizeCategoryDidChange), name: UIContentSizeCategory.didChangeNotification, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(willEnterForeground(_:)), name: UIApplication.willEnterForegroundNotification, object: nil)
refreshControl = UIRefreshControl()
refreshControl!.addTarget(self, action: #selector(refreshAccounts(_:)), for: .valueChanged)
@ -140,6 +141,10 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner {
applyChanges(animate: false)
}
@objc func willEnterForeground(_ note: Notification) {
updateUI()
}
// MARK: Table View
override func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {