Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
liberty
tunnel
liberty-tunnel-client-library-apple
Commits
616596ee
Commit
616596ee
authored
Sep 18, 2019
by
Jose Blaya
Browse files
Raise a notification if the app should reload and change the theme
parent
2db2651b
Changes
2
Show whitespace changes
Inline
Side-by-side
PIALibrary/Sources/UI/iOS/Notification+UI.swift
View file @
616596ee
...
...
@@ -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"
)
}
PIALibrary/Sources/UI/iOS/ViewControllers/AutolayoutViewController.swift
View file @
616596ee
...
...
@@ -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
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment