mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-05-02 00:40:14 +00:00
Show loading spinner on every refresh, not just first load
This commit is contained in:
parent
2dcf6f37f6
commit
053ca25253
1 changed files with 2 additions and 3 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue