Reload the webview when rotating the device on an iPhone. Fixes #3041

This commit is contained in:
Maurice Parker 2021-05-04 21:44:55 -05:00
parent 28b00260e0
commit 7e820c58e5
1 changed files with 7 additions and 0 deletions

View File

@ -79,6 +79,13 @@ class WebViewController: UIViewController {
}
override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
// We need to reload the webview on the iPhone when rotation happens to clear out any old bad viewport sizes
if traitCollection.userInterfaceIdiom == .phone {
loadWebView()
}
}
// MARK: Notifications
@objc func webFeedIconDidBecomeAvailable(_ note: Notification) {