From ed22fbc3511166d9513ed8a681b71579fb58c127 Mon Sep 17 00:00:00 2001 From: Hermes Date: Thu, 13 Aug 2026 15:48:13 +0000 Subject: [PATCH] Empty state pull-to-refresh + inline title aligned with gear; bump to 2.8 - Empty state ('No open PRs') was a bare ContentUnavailableView with no pull-to-refresh, so you couldn't reload when the list was empty. Wrap it in a refreshable ScrollView so pulling down reloads even with no PRs. - Switch the landing title from .large to .inline so 'Pull Requests' sits on the same row as the settings gear (better space use). Bump to 2.8. --- GiteaPR.xcodeproj/project.pbxproj | 8 ++++---- GiteaPR/Views/InboxView.swift | 17 ++++++++++++----- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/GiteaPR.xcodeproj/project.pbxproj b/GiteaPR.xcodeproj/project.pbxproj index 870051f..744d8b5 100644 --- a/GiteaPR.xcodeproj/project.pbxproj +++ b/GiteaPR.xcodeproj/project.pbxproj @@ -187,7 +187,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 18; + CURRENT_PROJECT_VERSION = 19; DEVELOPMENT_TEAM = ""; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_CFBundleDisplayName = "GiteaPR"; @@ -197,7 +197,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.7; + MARKETING_VERSION = 2.8; PRODUCT_BUNDLE_IDENTIFIER = com.bueso.giteapr; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; @@ -211,7 +211,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 18; + CURRENT_PROJECT_VERSION = 19; DEVELOPMENT_TEAM = ""; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_CFBundleDisplayName = "GiteaPR"; @@ -221,7 +221,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.7; + MARKETING_VERSION = 2.8; PRODUCT_BUNDLE_IDENTIFIER = com.bueso.giteapr; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; diff --git a/GiteaPR/Views/InboxView.swift b/GiteaPR/Views/InboxView.swift index 78b75cd..499fb62 100644 --- a/GiteaPR/Views/InboxView.swift +++ b/GiteaPR/Views/InboxView.swift @@ -21,10 +21,17 @@ struct InboxView: View { ToolbarItem(placement: .primaryAction) { settingsButton } } } else if vm.displayedRows.isEmpty && !vm.isLoading { - ContentUnavailableView( - "No open PRs", - systemImage: "tray", - description: Text("Nothing to review.")) + // Empty state as a refreshable ScrollView so pulling down + // reloads even when there are no PRs (a ContentUnavailableView + // alone has no pull-to-refresh). + ScrollView { + ContentUnavailableView( + "No open PRs", + systemImage: "tray", + description: Text("Pull down to refresh.")) + .frame(maxWidth: .infinity, minHeight: 400) + } + .refreshable { await vm.load() } } else { List { ForEach(vm.displayedRows) { row in @@ -38,7 +45,7 @@ struct InboxView: View { } } .navigationTitle("Pull Requests") - .navigationBarTitleDisplayMode(.large) + .navigationBarTitleDisplayMode(.inline) .toolbar { ToolbarItem(placement: .primaryAction) { settingsButton } }