From 441b69afae30ee6b662be38004fd7b5de1e47302 Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Thu, 19 Mar 2026 01:17:49 -0500 Subject: feat: add support for reading inbox messages (emails) and replying in-app --- Hutch/App/AppState.swift | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'Hutch/App/AppState.swift') diff --git a/Hutch/App/AppState.swift b/Hutch/App/AppState.swift index 624c78d..7492fa6 100644 --- a/Hutch/App/AppState.swift +++ b/Hutch/App/AppState.swift @@ -7,6 +7,15 @@ import WebKit @MainActor final class AppState { + enum Tab: Hashable { + case home + case inbox + case repositories + case builds + case tickets + case settings + } + enum AuthPhase { /// App just launched, checking for an existing token. case launching @@ -25,6 +34,8 @@ final class AppState { authPhase == .authenticated && currentUser != nil } + var selectedTab: Tab = .home + // MARK: - Current user (populated after successful validation) private(set) var currentUser: User? @@ -94,6 +105,7 @@ final class AppState { await clearWebData() clearWebContentRenderCaches() authPhase = .unauthenticated + selectedTab = .home } func resetAppData() async { @@ -108,6 +120,7 @@ final class AppState { clearWebContentRenderCaches() authPhase = .unauthenticated + selectedTab = .home } // MARK: - Deep link resolution @@ -208,6 +221,7 @@ final class AppState { client.responseCache.clear() currentUser = nil pendingDeepLink = nil + selectedTab = .home } private func clearWebData() async { -- cgit v1.2.3