Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix introspect not being able to theme the SwiftUI navigation bars. #5556

Merged
merged 1 commit into from
Feb 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ struct LocationSharingView: View {
}
}
.navigationBarTitleDisplayMode(.inline)
.introspectNavigationController { navigationController in
ThemeService.shared().theme.applyStyle(onNavigationBar: navigationController.navigationBar)
}
.ignoresSafeArea()
.alert(item: $context.alertInfo) { info in
if let secondaryButton = info.secondaryButton {
Expand All @@ -89,9 +92,6 @@ struct LocationSharingView: View {
.accentColor(theme.colors.accent)
.activityIndicator(show: context.viewState.showLoadingIndicator)
.navigationViewStyle(StackNavigationViewStyle())
.introspectNavigationController { navigationController in
ThemeService.shared().theme.applyStyle(onNavigationBar: navigationController.navigationBar)
}
}

@ViewBuilder
Expand Down
6 changes: 3 additions & 3 deletions RiotSwiftUI/Modules/Room/PollEditForm/View/PollEditForm.swift
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,14 @@ struct PollEditForm: View {
}
}
.navigationBarTitleDisplayMode(.inline)
.introspectNavigationController { navigationController in
ThemeService.shared().theme.applyStyle(onNavigationBar: navigationController.navigationBar)
}
}
}
}
.accentColor(theme.colors.accent)
.navigationViewStyle(StackNavigationViewStyle())
.introspectNavigationController { navigationController in
ThemeService.shared().theme.applyStyle(onNavigationBar: navigationController.navigationBar)
}
}
}

Expand Down
1 change: 1 addition & 0 deletions changelog.d/pr-5556.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix introspect not being able to theme the SwiftUI navigation bars.