Reload the web view when the Theme changes

This commit is contained in:
Maurice Parker 2021-09-12 15:44:24 -05:00
parent cad91d9415
commit 7646029f2e
1 changed files with 6 additions and 1 deletions

View File

@ -70,7 +70,8 @@ class WebViewController: UIViewController {
NotificationCenter.default.addObserver(self, selector: #selector(webFeedIconDidBecomeAvailable(_:)), name: .WebFeedIconDidBecomeAvailable, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(avatarDidBecomeAvailable(_:)), name: .AvatarDidBecomeAvailable, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(faviconDidBecomeAvailable(_:)), name: .FaviconDidBecomeAvailable, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(currentArticleThemeDidChangeNotification(_:)), name: .CurrentArticleThemeDidChangeNotification, object: nil)
// Configure the tap zones
configureTopShowBarsView()
configureBottomShowBarsView()
@ -100,6 +101,10 @@ class WebViewController: UIViewController {
reloadArticleImage()
}
@objc func currentArticleThemeDidChangeNotification(_ note: Notification) {
loadWebView()
}
// MARK: Actions
@objc func showBars(_ sender: Any) {