mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-10-19 18:23:41 +00:00
fix(menubar): keep the not-signed-in flag clear of the ClinePass failure fields
This commit is contained in:
parent
1bdee436d1
commit
e4ebafbb11
1 changed files with 5 additions and 4 deletions
|
|
@ -154,8 +154,6 @@ enum CapacityDockProviderFetchFailureDisposition: Equatable, Sendable {
|
|||
struct CapacityDockProviderFetchFailure: LocalizedError, Equatable, Sendable {
|
||||
let message: String
|
||||
let disposition: CapacityDockProviderFetchFailureDisposition
|
||||
/// No credentials or local app data at all, as opposed to a failed check.
|
||||
var notSignedIn = false
|
||||
|
||||
init(message: String, disposition: CapacityDockProviderFetchFailureDisposition) {
|
||||
self.message = message
|
||||
|
|
@ -163,8 +161,6 @@ struct CapacityDockProviderFetchFailure: LocalizedError, Equatable, Sendable {
|
|||
}
|
||||
|
||||
init(error: Error) {
|
||||
message = error.localizedDescription
|
||||
disposition = Self.disposition(for: error)
|
||||
switch error {
|
||||
case ClinePassSubscriptionService.FetchError.noCredentials,
|
||||
CommandCodeSubscriptionService.FetchError.noCredentials,
|
||||
|
|
@ -179,10 +175,15 @@ struct CapacityDockProviderFetchFailure: LocalizedError, Equatable, Sendable {
|
|||
default:
|
||||
break
|
||||
}
|
||||
message = error.localizedDescription
|
||||
disposition = Self.disposition(for: error)
|
||||
}
|
||||
|
||||
var errorDescription: String? { message }
|
||||
|
||||
/// No credentials or local app data at all, as opposed to a failed check.
|
||||
var notSignedIn = false
|
||||
|
||||
static func disposition(for error: Error) -> CapacityDockProviderFetchFailureDisposition {
|
||||
if let failure = error as? CapacityDockProviderFetchFailure {
|
||||
return failure.disposition
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue