From 976742e173356432b69afe2afb5a2c1b6d5dcd80 Mon Sep 17 00:00:00 2001 From: Georg Bauer Date: Mon, 3 Aug 2026 20:38:35 +0200 Subject: [PATCH] Add server picker to Home --- TESTING.md | 5 +++++ ios/Sources/HomeScreen.swift | 14 +++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/TESTING.md b/TESTING.md index a1a28fc..467086e 100644 --- a/TESTING.md +++ b/TESTING.md @@ -117,6 +117,11 @@ answer before uploading it to App Store Connect. still work without re-entry. - [ ] Open the server picker from a repository list and switch between at least two configured servers; every data tab changes to the selected server. +- [ ] On Home, the leading server button opens the same Servers screen as the + other data tabs. Select a different server and verify Home reloads its + title, contribution summary, filters, and activity for that server. +- [ ] With no selected server, Home still shows its server button and its empty + state directs the user to that button. - [ ] Swipe a server row from the trailing edge; Delete and Edit use native contextual actions with symbols. A full swipe invokes Delete, and both a full swipe and a Delete tap still require the same destructive alert. diff --git a/ios/Sources/HomeScreen.swift b/ios/Sources/HomeScreen.swift index 1185070..a1275a8 100644 --- a/ios/Sources/HomeScreen.swift +++ b/ios/Sources/HomeScreen.swift @@ -33,6 +33,18 @@ final class HomeViewController: RefreshingTableViewController { override func viewDidLoad() { super.viewDidLoad() + let servers = UIBarButtonItem( + image: context.symbol("server.rack"), + primaryAction: UIAction { [weak self] _ in + guard let self else { return } + self.navigationController?.pushViewController( + ServersViewController(context: self.context), + animated: true + ) + } + ) + servers.accessibilityLabel = "Servers" + navigationItem.leftBarButtonItem = servers let settings = UIBarButtonItem( image: context.symbol("gearshape"), primaryAction: UIAction { [weak self] _ in @@ -57,7 +69,7 @@ final class HomeViewController: RefreshingTableViewController { guard context.core.activeServerIndex() != nil else { tableView.backgroundView = EmptyBackgroundView( title: "No server selected", - detail: "Open Issues or Repos to select a server or add your first one." + detail: "Use the server button to select a server or add your first one." ) refreshControl?.endRefreshing() return