Empty state pull-to-refresh + inline title aligned with gear; bump to 2.8
Build iOS App / Build .ipa and publish source (push) Successful in 22s
Build iOS App / Build .ipa and publish source (push) Successful in 22s
- 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.
This commit is contained in:
1 parent
8021b0a513
commit
ed22fbc351
2 files changed
+16
-9
No files matched your search
@@ -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;
|
||||
|
||||
@@ -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 }
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user