nav: remove environmentObjects
environment objects are implicit arguments that cannot be checked by the compiler. They are a common source of crashes. Use a main NavigationCoordinator in DamusState for the core app, and pass in other coordinators in the account setup view for the parts of the app that don't have a DamusState.
This commit is contained in:
@@ -89,7 +89,6 @@ struct NotificationsView: View {
|
||||
@SceneStorage("NotificationsView.filter_state") var filter_state: NotificationFilterState = .all
|
||||
|
||||
@Environment(\.colorScheme) var colorScheme
|
||||
@EnvironmentObject var navigationCoordinator: NavigationCoordinator
|
||||
|
||||
var mystery: some View {
|
||||
VStack(spacing: 20) {
|
||||
@@ -174,7 +173,6 @@ struct NotificationsView: View {
|
||||
.frame(height: 5)
|
||||
ForEach(filter.filter(contacts: state.contacts, items: notifications.notifications), id: \.id) { item in
|
||||
NotificationItemView(state: state, item: item)
|
||||
.environmentObject(navigationCoordinator)
|
||||
}
|
||||
}
|
||||
.background(GeometryReader { proxy -> Color in
|
||||
|
||||
Reference in New Issue
Block a user