Linux + iPhone Continuity / iMessage / SMS
fix(ios): transition to Files tab when file arrives
Zack Bartelfd212cb4a7c8
diff --git a/apple/Tether/ContentView.swift b/apple/Tether/ContentView.swiftindex 9306354..dc352ab 100644--- a/apple/Tether/ContentView.swift+++ b/apple/Tether/ContentView.swift@@ -14,20 +14,20 @@ struct ContentView: View {var body: some View {@Bindable var vm = viewModel- TabView {- Tab("Dashboard", systemImage: "antenna.radiowaves.left.and.right") {+ TabView(selection: $vm.selectedTab) {+ Tab("Dashboard", systemImage: "antenna.radiowaves.left.and.right", value: AppTab.dashboard) {DashboardView()}- Tab("Clipboard", systemImage: "clipboard") {+ Tab("Clipboard", systemImage: "clipboard", value: AppTab.clipboard) {ClipboardView()}- Tab("Files", systemImage: "arrow.up.arrow.down") {+ Tab("Files", systemImage: "arrow.up.arrow.down", value: AppTab.files) {FilesView()}- Tab("Settings", systemImage: "gearshape") {+ Tab("Settings", systemImage: "gearshape", value: AppTab.settings) {SettingsView()}}diff --git a/apple/Tether/ViewModels/TetherViewModel.swift b/apple/Tether/ViewModels/TetherViewModel.swiftindex e238e54..9d38139 100644--- a/apple/Tether/ViewModels/TetherViewModel.swift+++ b/apple/Tether/ViewModels/TetherViewModel.swift@@ -21,6 +21,14 @@ enum AppConnectionState: Equatable {case connected}+// The top-level tab currently shown.+enum AppTab: Hashable {+ case dashboard+ case clipboard+ case files+ case settings+}+// A clipboard history entry.struct ClipboardEntry: Identifiable {let id = UUID()@@ -99,6 +107,9 @@ final class TetherViewModel {// Whether the pairing sheet should be presented.var showPairingSheet = false+ // The currently selected top-level tab.+ var selectedTab: AppTab = .dashboard+// Status message for the pairing flow.private(set) var pairingStatus: String = ""@@ -657,6 +668,7 @@ final class TetherViewModel {transfer.isComplete = truetransfer.savedURL = destinationcompletedTransfers.insert(transfer, at: 0)+ selectedTab = .files}} catch {if let idx = activeTransfers.firstIndex(where: { $0.id == transferId }) {