Skip to content

Commit 3d05a6b

Browse files
kosuke-satakeclaude
andcommitted
Open a licence text from its row
Tapping a row in Settings > Licences left a blank page: a value-based link had no destination it could use, because the Settings sheet already reaches this screen through its own link. Each row now carries its own destination. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
1 parent 34030f3 commit 3d05a6b

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎App/Sheets/LicensesView.swift‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,11 @@ struct LicensesView: View {
6666
}
6767
Section {
6868
ForEach(LicenseEntry.all) { entry in
69-
NavigationLink(value: entry) {
69+
// A link that carries its own destination: a value-based link needs a registered destination somewhere up the
70+
// stack, and the Settings sheet already reaches this screen through a link of its own.
71+
NavigationLink {
72+
LicenseText(entry: entry)
73+
} label: {
7074
VStack(alignment: .leading, spacing: 2) {
7175
Text(entry.name)
7276
Text("\(Text(entry.purpose)) · \(entry.licence)").font(.footnote).foregroundStyle(.secondary)
@@ -81,7 +85,6 @@ struct LicensesView: View {
8185
}
8286
.navigationTitle("Licences")
8387
.navigationBarTitleDisplayMode(.inline)
84-
.navigationDestination(for: LicenseEntry.self) { LicenseText(entry: $0) }
8588
}
8689
}
8790

0 commit comments

Comments
 (0)