Commit 02629086 authored by Jose Blaya's avatar Jose Blaya
Browse files

Detect theme changes in viewDidLayoutSubviews instead traitCollectionDidChange...

Detect theme changes in viewDidLayoutSubviews instead traitCollectionDidChange as it's called twice with light and dark mode when entering background for snapshotting
parent d98ad532
......@@ -69,7 +69,10 @@ open class AutolayoutViewController: UIViewController, ModalController, Restylab
/// :nodoc:
open override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
//MARK: - iOS13 Dark mode
if #available(iOS 13.0, *) {
Macros.postNotification(.PIAThemeShouldChange)
}
refreshOrientationConstraints(size: view.bounds.size)
}
......@@ -186,16 +189,6 @@ open class AutolayoutViewController: UIViewController, ModalController, Restylab
}
//MARK: - iOS13 Dark mode
extension AutolayoutViewController {
override open func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
super.traitCollectionDidChange(previousTraitCollection)
Macros.postNotification(.PIAThemeShouldChange)
}
}
extension AutolayoutViewController: AnimatingLoadingDelegate {
private struct LottieRepos {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment