Skip to content

Commit

Permalink
Fix introspect not being able to theme the SwiftUI navigation bars.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanceriu committed Feb 11, 2022
1 parent 94dab7a commit a0dc711
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
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
Empty file added changelog.d/pr-5556.misc
Empty file.

0 comments on commit a0dc711

Please sign in to comment.