From 746d061dcfd25579977fa6ef5a3c34eb0d9043dc Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Mon, 6 Jan 2020 21:23:39 -0700 Subject: [PATCH] Refresh UI (including progress indicator) on Timeline when coming out of suspend. --- iOS/MasterTimeline/MasterTimelineViewController.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/iOS/MasterTimeline/MasterTimelineViewController.swift b/iOS/MasterTimeline/MasterTimelineViewController.swift index 45d327c07..46c476e8e 100644 --- a/iOS/MasterTimeline/MasterTimelineViewController.swift +++ b/iOS/MasterTimeline/MasterTimelineViewController.swift @@ -51,6 +51,7 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner NotificationCenter.default.addObserver(self, selector: #selector(userDefaultsDidChange(_:)), name: UserDefaults.didChangeNotification, object: nil) NotificationCenter.default.addObserver(self, selector: #selector(contentSizeCategoryDidChange), name: UIContentSizeCategory.didChangeNotification, object: nil) NotificationCenter.default.addObserver(self, selector: #selector(displayNameDidChange), name: .DisplayNameDidChange, object: nil) + NotificationCenter.default.addObserver(self, selector: #selector(willEnterForeground(_:)), name: UIApplication.willEnterForegroundNotification, object: nil) // Setup the Search Controller searchController.delegate = self @@ -448,6 +449,10 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner } } + @objc func willEnterForeground(_ note: Notification) { + updateUI() + } + @objc func scrollPositionDidChange() { coordinator.timelineMiddleIndexPath = tableView.middleVisibleRow() }