Skip to content

Commit

Permalink
Merge pull request #1123 from planetary-social/bugfix/cannot-share-lo…
Browse files Browse the repository at this point in the history
…gs-bool

Fix “Share logs” with new Binding
  • Loading branch information
joshuatbrown authored May 10, 2024
2 parents e0e337e + e6e2412 commit 2cb49fc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- Fixed an issue where "Share logs" wasn't working.
- On the Discover tab, center the category buttons.

## [0.1.12] - 2024-05-07Z
Expand Down
15 changes: 13 additions & 2 deletions Nos/Views/SettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ struct SettingsView: View {
@State private var privateKeyString = ""
@State private var alert: AlertState<AlertAction>?
@State private var logFileURL: URL?
private var showActivitySheet: Binding<Bool> {
Binding<Bool>(
get: { logFileURL != nil },
set: { _ in }
)
}

@State private var showReportWarnings = true
@State private var showOutOfNetworkWarning = true

Expand Down Expand Up @@ -171,8 +178,12 @@ struct SettingsView: View {
}
}
.padding(.vertical, 5)
.sheet(unwrapping: $logFileURL) { logFileURL in
ActivityViewController(activityItems: [logFileURL.wrappedValue])
.sheet(isPresented: showActivitySheet) {
if let logFileURL {
ActivityViewController(activityItems: [logFileURL])
} else {
EmptyView()
}
}

#if DEBUG
Expand Down

0 comments on commit 2cb49fc

Please sign in to comment.