Skip to content
Open
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
5 changes: 5 additions & 0 deletions .changeset/40f4ab66.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"hex-app": patch
---

Improve changelog sheet dismissal by adding a persistent top Close control while keeping the bottom Close button
6 changes: 4 additions & 2 deletions Hex/Features/Settings/AboutView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ struct AboutView: View {
.sheet(isPresented: $showingChangelog, onDismiss: {
showingChangelog = false
}) {
ChangelogView()
NavigationStack {
ChangelogView()
}
}
}
HStack {
Expand All @@ -50,4 +52,4 @@ struct AboutView: View {
.formStyle(.grouped)
.enableInjection()
}
}
}
12 changes: 8 additions & 4 deletions Hex/Features/Settings/ChangelogView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ struct ChangelogView: View {
var body: some View {
ScrollView {
VStack(alignment: .leading, spacing: 10) {
Text("Changelog")
.font(.title)
.padding(.bottom, 10)

if let changelogPath = Bundle.main.path(forResource: "changelog", ofType: "md"),
let changelogContent = try? String(
contentsOfFile: changelogPath, encoding: .utf8)
Expand All @@ -33,6 +29,14 @@ struct ChangelogView: View {
}
.padding()
}
.navigationTitle("Changelog")
.toolbar {
ToolbarItem(placement: .cancellationAction) {
Button("Close") {
dismiss()
}
}
}
.enableInjection()
}
}