Show loading spinner on every refresh, not just first load

This commit is contained in:
AgentSeal 2026-04-24 02:59:38 +02:00
parent 2dcf6f37f6
commit 053ca25253

View file

@ -73,11 +73,10 @@ final class AppStore {
let key = currentKey
guard !inFlightKeys.contains(key) else { return }
inFlightKeys.insert(key)
let showLoading = cache[key] == nil
if showLoading { isLoading = true }
isLoading = true
defer {
inFlightKeys.remove(key)
if showLoading { isLoading = false }
isLoading = false
}
do {
let fresh = try await DataClient.fetch(period: key.period, provider: key.provider, includeOptimize: includeOptimize)