diff options
| author | Christian Cleberg <[email protected]> | 2026-04-13 20:32:40 -0500 |
|---|---|---|
| committer | Christian Cleberg <[email protected]> | 2026-04-13 20:32:40 -0500 |
| commit | d6968ea122d910b432bd539cf2fa3d1cee962fdb (patch) | |
| tree | b5fe9a85880d2a153a2a9d4ee8f1ab2156f64d25 /Hutch/Views/Builds/BuildListViewModel.swift | |
| parent | 312e535f400f31714b3750de5222a1f6a8e5bcda (diff) | |
| download | hutch-3.1.5.tar.gz hutch-3.1.5.tar.bz2 hutch-3.1.5.zip | |
fix: more sonarqube quality fixesv3.1.5
Diffstat (limited to 'Hutch/Views/Builds/BuildListViewModel.swift')
| -rw-r--r-- | Hutch/Views/Builds/BuildListViewModel.swift | 5 |
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 |
