From 00cc231e9b419d27b412036d93457c2cbabe0b16 Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Sat, 11 Apr 2026 23:36:35 -0500 Subject: Add SourceHut system status screen and home disruption banner --- Hutch/App/AppState.swift | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'Hutch/App/AppState.swift') diff --git a/Hutch/App/AppState.swift b/Hutch/App/AppState.swift index c519adc..95d9fa9 100644 --- a/Hutch/App/AppState.swift +++ b/Hutch/App/AppState.swift @@ -19,6 +19,7 @@ final class AppState { case repository(RepositorySummary) case tracker(TrackerSummary) case mailingList(InboxMailingListReference) + case systemStatus } enum AuthPhase { @@ -57,6 +58,7 @@ final class AppState { let client: SRHTClient let configuration: AppConfiguration + let systemStatusRepository: SystemStatusRepository // MARK: - Deep link pending navigation @@ -71,6 +73,7 @@ final class AppState { self.configuration = AppConfiguration() let token = KeychainHelper.loadToken() self.client = SRHTClient(token: token) + self.systemStatusRepository = SystemStatusRepository() } // MARK: - Launch validation @@ -273,6 +276,11 @@ final class AppState { selectedTab = .more } + func openSystemStatus() { + pendingTabNavigation = .systemStatus + selectedTab = .more + } + func presentRepositoryDeepLinkError() { deepLinkError = "The repository could not be found or is inaccessible." } @@ -374,7 +382,11 @@ final class AppState { return } - let viewModel = HomeViewModel(currentUser: currentUser, client: client) + let viewModel = HomeViewModel( + currentUser: currentUser, + client: client, + systemStatusRepository: systemStatusRepository + ) await viewModel.loadDashboard() } -- cgit v1.2.3