From d42b4ed69933cfc19c90f98b80e2d209a3c3a093 Mon Sep 17 00:00:00 2001 From: Max Goedjen Date: Sat, 23 Aug 2025 18:38:54 -0700 Subject: [PATCH] Reload --- .../Sources/SmartCardSecretKit/SmartCardStore.swift | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Sources/Packages/Sources/SmartCardSecretKit/SmartCardStore.swift b/Sources/Packages/Sources/SmartCardSecretKit/SmartCardStore.swift index 39708d9..c042936 100644 --- a/Sources/Packages/Sources/SmartCardSecretKit/SmartCardStore.swift +++ b/Sources/Packages/Sources/SmartCardSecretKit/SmartCardStore.swift @@ -123,12 +123,13 @@ extension SmartCard.Store { /// Resets the token ID and reloads secrets. /// - Parameter tokenID: The ID of the token that was inserted. @MainActor private func smartcardInserted(for tokenID: String? = nil) { - guard let string = state.watcher.nonSecureEnclaveTokens.first else { return } - guard state.tokenID == nil else { return } - guard !string.contains("setoken") else { return } - state.tokenID = string - state.watcher.addRemovalHandler(self.smartcardRemoved, forTokenID: string) - state.tokenID = string + guard let string = state.watcher.nonSecureEnclaveTokens.first else { return } + guard state.tokenID == nil else { return } + guard !string.contains("setoken") else { return } + state.tokenID = string + state.watcher.addRemovalHandler(self.smartcardRemoved, forTokenID: string) + state.tokenID = string + reloadSecretsInternal() } /// Resets the token ID and reloads secrets.