summaryrefslogtreecommitdiff
path: root/Hutch/Views/Builds
diff options
context:
space:
mode:
authorChristian Cleberg <[email protected]>2026-04-13 20:32:40 -0500
committerChristian Cleberg <[email protected]>2026-04-13 20:32:40 -0500
commitd6968ea122d910b432bd539cf2fa3d1cee962fdb (patch)
treeb5fe9a85880d2a153a2a9d4ee8f1ab2156f64d25 /Hutch/Views/Builds
parent312e535f400f31714b3750de5222a1f6a8e5bcda (diff)
downloadhutch-d6968ea122d910b432bd539cf2fa3d1cee962fdb.tar.gz
hutch-d6968ea122d910b432bd539cf2fa3d1cee962fdb.tar.bz2
hutch-d6968ea122d910b432bd539cf2fa3d1cee962fdb.zip
fix: more sonarqube quality fixesv3.1.5
Diffstat (limited to 'Hutch/Views/Builds')
-rw-r--r--Hutch/Views/Builds/BuildListViewModel.swift5
1 files changed, 3 insertions, 2 deletions
diff --git a/Hutch/Views/Builds/BuildListViewModel.swift b/Hutch/Views/Builds/BuildListViewModel.swift
index 643bacd..cf5d786 100644
--- a/Hutch/Views/Builds/BuildListViewModel.swift
+++ b/Hutch/Views/Builds/BuildListViewModel.swift
@@ -182,12 +182,13 @@ final class BuildListViewModel {
/// Fetch the first page of jobs. Shows cached data instantly if available,
/// then refreshes from the network in the background.
func loadJobs() async {
- // Show cached data immediately on first load
+ // Show cached data immediately on first load (may populate `jobs` from cache).
if jobs.isEmpty {
loadFromCache()
}
- if jobs.isEmpty {
+ let treatAsInitialLoad = jobs.isEmpty
+ if treatAsInitialLoad {
isLoading = true
} else {
isRefreshing = true