mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-12-03 03:29:51 +00:00
fix(mac): drop the post-await disconnect guards the refresh generation already covers
This commit is contained in:
parent
541829998b
commit
1ffa3ec6c6
1 changed files with 0 additions and 6 deletions
|
|
@ -1736,17 +1736,14 @@ final class AppStore {
|
|||
do {
|
||||
let usage = try await copilotQuotaRuntime.refresh()
|
||||
guard gen == copilotRefreshGen else { return }
|
||||
if CopilotExplicitDisconnect.isSet(defaults: copilotQuotaRuntime.defaults) { return }
|
||||
copilotUsage = usage
|
||||
copilotError = nil
|
||||
copilotLoadState = .loaded
|
||||
} catch let err as CopilotSubscriptionService.FetchError {
|
||||
guard gen == copilotRefreshGen else { return }
|
||||
if CopilotExplicitDisconnect.isSet(defaults: copilotQuotaRuntime.defaults) { return }
|
||||
applyCopilotFetchError(err)
|
||||
} catch {
|
||||
guard gen == copilotRefreshGen else { return }
|
||||
if CopilotExplicitDisconnect.isSet(defaults: copilotQuotaRuntime.defaults) { return }
|
||||
copilotError = sanitizeForUI(error.localizedDescription)
|
||||
copilotLoadState = .failed
|
||||
}
|
||||
|
|
@ -1782,19 +1779,16 @@ final class AppStore {
|
|||
do {
|
||||
let usage = try await copilotQuotaRuntime.refresh()
|
||||
guard gen == copilotRefreshGen else { return false }
|
||||
if CopilotExplicitDisconnect.isSet(defaults: copilotQuotaRuntime.defaults) { return false }
|
||||
copilotUsage = usage
|
||||
copilotError = nil
|
||||
copilotLoadState = .loaded
|
||||
return true
|
||||
} catch let err as CopilotSubscriptionService.FetchError {
|
||||
guard gen == copilotRefreshGen else { return false }
|
||||
if CopilotExplicitDisconnect.isSet(defaults: copilotQuotaRuntime.defaults) { return false }
|
||||
applyCopilotFetchError(err)
|
||||
return false
|
||||
} catch {
|
||||
guard gen == copilotRefreshGen else { return false }
|
||||
if CopilotExplicitDisconnect.isSet(defaults: copilotQuotaRuntime.defaults) { return false }
|
||||
copilotError = sanitizeForUI(error.localizedDescription)
|
||||
copilotLoadState = .failed
|
||||
return false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue