diff options
| author | Christian Cleberg <[email protected]> | 2026-04-12 00:34:54 -0500 |
|---|---|---|
| committer | Christian Cleberg <[email protected]> | 2026-04-12 00:34:54 -0500 |
| commit | 5f6d545eb3455a9e4da5a3cb4460811e3a48d939 (patch) | |
| tree | 7b7591146da4e02bd617ddb9f26e47b1c4474ef6 /Hutch/App | |
| parent | cb1ea5ea4f163d87053285d3fb7999b12a3558b9 (diff) | |
| download | hutch-5f6d545eb3455a9e4da5a3cb4460811e3a48d939.tar.gz hutch-5f6d545eb3455a9e4da5a3cb4460811e3a48d939.tar.bz2 hutch-5f6d545eb3455a9e4da5a3cb4460811e3a48d939.zip | |
improve home attention flows and cross-linkingv2.14.0
Diffstat (limited to 'Hutch/App')
| -rw-r--r-- | Hutch/App/AppState.swift | 36 |
1 files changed, 31 insertions, 5 deletions
diff --git a/Hutch/App/AppState.swift b/Hutch/App/AppState.swift index 95d9fa9..c2e2744 100644 --- a/Hutch/App/AppState.swift +++ b/Hutch/App/AppState.swift @@ -261,22 +261,48 @@ final class AppState { func openProjectSource(_ source: Project.SourceRepo) async throws { let repository = try await resolveProjectSource(source) - pendingTabNavigation = .repository(repository) - selectedTab = .repositories + navigateToRepository(repository) } func openProjectTracker(_ tracker: Project.Tracker) async throws { let resolvedTracker = try await resolveProjectTracker(tracker) - pendingTabNavigation = .tracker(resolvedTracker) - selectedTab = .tickets + navigateToTracker(resolvedTracker) } func openMailingList(_ mailingList: InboxMailingListReference) { + navigateToMailingList(mailingList) + } + + func openSystemStatus() { + navigateToSystemStatus() + } + + func navigateToRepository(_ repository: RepositorySummary) { + pendingTabNavigation = .repository(repository) + selectedTab = .repositories + } + + func navigateToTracker(_ tracker: TrackerSummary) { + pendingTabNavigation = .tracker(tracker) + selectedTab = .tickets + } + + func navigateToBuild(jobId: Int) { + pendingDeepLink = .build(jobId: jobId) + selectedTab = .builds + } + + func navigateToTicket(ownerUsername: String, trackerName: String, ticketId: Int) { + pendingDeepLink = .ticket(owner: ownerUsername, tracker: trackerName, ticketId: ticketId) + selectedTab = .tickets + } + + func navigateToMailingList(_ mailingList: InboxMailingListReference) { pendingTabNavigation = .mailingList(mailingList) selectedTab = .more } - func openSystemStatus() { + func navigateToSystemStatus() { pendingTabNavigation = .systemStatus selectedTab = .more } |
