summaryrefslogtreecommitdiff
path: root/Hutch
diff options
context:
space:
mode:
Diffstat (limited to 'Hutch')
-rw-r--r--Hutch/App/RootView.swift3
-rw-r--r--Hutch/Views/Lookup/LookupView.swift2
-rw-r--r--Hutch/Views/Patchsets/PatchsetDetailView.swift12
-rw-r--r--Hutch/Views/Projects/ProjectMailingListView.swift6
4 files changed, 15 insertions, 8 deletions
diff --git a/Hutch/App/RootView.swift b/Hutch/App/RootView.swift
index 59d7caa..1ae4651 100644
--- a/Hutch/App/RootView.swift
+++ b/Hutch/App/RootView.swift
@@ -439,7 +439,6 @@ enum MoreRoute: Hashable {
case projectDashboard(id: String, title: String?)
case mailingList(InboxMailingListReference)
case thread(InboxThreadSummary)
- case patchset(id: Int, listName: String?)
case manPageBrowser
case manPage(URL)
}
@@ -473,8 +472,6 @@ private struct MoreNavigationRoot: View {
ProjectDashboardDeepLinkView(projectID: id, title: title)
case .mailingList(let mailingList):
MailingListDetailView(mailingList: mailingList)
- case .patchset(let id, let listName):
- PatchsetDetailView(patchsetID: id, listName: listName)
case .thread(let thread):
ThreadDetailView(
thread: thread,
diff --git a/Hutch/Views/Lookup/LookupView.swift b/Hutch/Views/Lookup/LookupView.swift
index b52bb3f..2a26282 100644
--- a/Hutch/Views/Lookup/LookupView.swift
+++ b/Hutch/Views/Lookup/LookupView.swift
@@ -465,8 +465,6 @@ struct LookupView: View {
ProjectDashboardDeepLinkView(projectID: id, title: title)
case .mailingList(let mailingList):
MailingListDetailView(mailingList: mailingList)
- case .patchset(let id, let listName):
- PatchsetDetailView(patchsetID: id, listName: listName)
case .thread(let thread):
ThreadDetailView(
thread: thread,
diff --git a/Hutch/Views/Patchsets/PatchsetDetailView.swift b/Hutch/Views/Patchsets/PatchsetDetailView.swift
index d76aab4..7bc5630 100644
--- a/Hutch/Views/Patchsets/PatchsetDetailView.swift
+++ b/Hutch/Views/Patchsets/PatchsetDetailView.swift
@@ -122,8 +122,14 @@ struct PatchsetDetailView: View {
// The version chain matters during review: a superseded series should
// usually be read at its newest version instead.
+ //
+ // Pushed directly rather than by value, for the same reason as the rows
+ // that lead here — this view inherits whatever stack presented it, and
+ // not all of them declare a MoreRoute destination.
if let supersededBy = patchset.supersededBy {
- NavigationLink(value: MoreRoute.patchset(id: supersededBy, listName: listName)) {
+ NavigationLink {
+ PatchsetDetailView(patchsetID: supersededBy, listName: listName)
+ } label: {
SwiftUI.Label("Superseded by a newer version", systemImage: "arrow.right.circle")
.font(.subheadline)
}
@@ -131,7 +137,9 @@ struct PatchsetDetailView: View {
}
if let supersedes = patchset.supersedes {
- NavigationLink(value: MoreRoute.patchset(id: supersedes, listName: listName)) {
+ NavigationLink {
+ PatchsetDetailView(patchsetID: supersedes, listName: listName)
+ } label: {
SwiftUI.Label("Revises an earlier version", systemImage: "arrow.left.circle")
.font(.subheadline)
}
diff --git a/Hutch/Views/Projects/ProjectMailingListView.swift b/Hutch/Views/Projects/ProjectMailingListView.swift
index 3933bf3..696cf6b 100644
--- a/Hutch/Views/Projects/ProjectMailingListView.swift
+++ b/Hutch/Views/Projects/ProjectMailingListView.swift
@@ -420,7 +420,11 @@ struct MailingListDetailView: View {
if showingPatches(viewModel) {
ForEach(viewModel.filteredPatchsets) { patchset in
- NavigationLink(value: MoreRoute.patchset(id: patchset.id, listName: mailingList.name)) {
+ // Pushed directly rather than by value: this view is also shown
+ // from a project, whose stack declares no MoreRoute destination.
+ NavigationLink {
+ PatchsetDetailView(patchsetID: patchset.id, listName: mailingList.name)
+ } label: {
PatchsetRow(patchset: patchset)
}
.themedRow()