Commit 616596ee authored by Jose Blaya's avatar Jose Blaya
Browse files

Raise a notification if the app should reload and change the theme

parent 2db2651b
......@@ -16,12 +16,15 @@ public extension Notification.Name {
// MARK: UI
/// Posted following a theme switch.
public static let PIAThemeDidChange = Notification.Name("PIAThemeDidChange")
static let PIAThemeDidChange = Notification.Name("PIAThemeDidChange")
/// Reload the tiles.
public static let PIATilesDidChange = Notification.Name("PIATilesDidChange")
static let PIATilesDidChange = Notification.Name("PIATilesDidChange")
/// Present Recover Signup page
public static let PIARecoverAccount = Notification.Name("PIARecoverAccount")
static let PIARecoverAccount = Notification.Name("PIARecoverAccount")
/// User toggled the dark mode
static let PIAThemeShouldChange = Notification.Name("PIAThemeShouldChange")
}
......@@ -186,6 +186,16 @@ 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