From 850f4b12d5df44638d3a60c4e1710d9c3e03eeae Mon Sep 17 00:00:00 2001 From: Bryan Montz Date: Fri, 1 Nov 2024 07:02:35 -0500 Subject: [PATCH] fix crash when tapping Post button on macOS #1687 --- CHANGELOG.md | 5 +++++ Nos/Views/AppView.swift | 2 ++ 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bc75ba5b6..1fcca7501 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Release Notes +- Fix crash when tapping Post button on macOS. [#1687](https://github.com/planetary-social/nos/issues/1687) + +### Internal Changes + ## [1.0.1] - 2024-10-28Z ### Release Notes diff --git a/Nos/Views/AppView.swift b/Nos/Views/AppView.swift index 9f91b25be..f6ec3abf1 100644 --- a/Nos/Views/AppView.swift +++ b/Nos/Views/AppView.swift @@ -13,6 +13,7 @@ struct AppView: View { @Dependency(\.crashReporting) private var crashReporting @Dependency(\.userDefaults) private var userDefaults @Environment(CurrentUser.self) var currentUser + @Environment(RelayService.self) private var relayService @State private var lastSelectedTab = AppDestination.home @State private var showNIP05Wizard = false @@ -163,6 +164,7 @@ struct AppView: View { .sheet(isPresented: $showNewPost) { NoteComposer(initialContents: newPostContents, isPresented: $showNewPost) .environment(currentUser) + .environment(relayService) .interactiveDismissDisabled() } }