Fix accent colour not being applied to Alerts etc. (#701)

This commit is contained in:
Doug
2023-03-14 13:38:36 +00:00
committed by GitHub
parent 8a069ecfa5
commit 1a81768c62
21 changed files with 20 additions and 50 deletions
@@ -22,6 +22,10 @@ struct Application: App {
private let applicationCoordinator: AppCoordinatorProtocol
init() {
// Set the tint colour app-wide. Using UIView ensures that alerts, confirmation dialogs
// and Xcode previews all take on the tint colour, similar to defining it in an asset catalog.
UIView.appearance().tintColor = .element.accent
if Tests.isRunningUITests {
applicationCoordinator = UITestsAppCoordinator()
} else {
@@ -35,7 +39,6 @@ struct Application: App {
EmptyView()
} else {
applicationCoordinator.toPresentable()
.accentColor(.element.accent)
.task {
applicationCoordinator.start()
}