mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 10:33:45 +00:00
Fix accent colour not being applied to Alerts etc. (#701)
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
@@ -371,11 +371,9 @@ private struct NavigationSplitCoordinatorView: View {
|
||||
// through the NavigationSplitCoordinator as well.
|
||||
.sheet(item: $navigationSplitCoordinator.sheetModule) { module in
|
||||
module.coordinator?.toPresentable()
|
||||
.tint(.element.accent)
|
||||
}
|
||||
.fullScreenCover(item: $navigationSplitCoordinator.fullScreenCoverModule) { module in
|
||||
module.coordinator?.toPresentable()
|
||||
.tint(.element.accent)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -666,11 +664,9 @@ private struct NavigationStackCoordinatorView: View {
|
||||
}
|
||||
.sheet(item: $navigationStackCoordinator.sheetModule) { module in
|
||||
module.coordinator?.toPresentable()
|
||||
.tint(.element.accent)
|
||||
}
|
||||
.fullScreenCover(item: $navigationStackCoordinator.fullScreenCoverModule) { module in
|
||||
module.coordinator?.toPresentable()
|
||||
.tint(.element.accent)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user