From d6968ea122d910b432bd539cf2fa3d1cee962fdb Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Mon, 13 Apr 2026 20:32:40 -0500 Subject: fix: more sonarqube quality fixes --- Hutch/Views/Builds/BuildListViewModel.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Hutch/Views/Builds') 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 -- cgit v1.2.3