Only poll clipboard if clipboard sync was enabled

This commit is contained in:
Leon Böttger committed 2026-05-16 14:51:07 +02:00
1 parent 72bfd88161
commit 488f1a14b2
2 files changed
+65 -7

No files matched your search

+7
View File
@@ -11,6 +11,7 @@ import CryptoKit
class TrustStore: ObservableObject {
static let shared = TrustStore()
static let trustedCertificatesDidChange = Notification.Name("TrustStore.trustedCertificatesDidChange")
@Published private(set) var trustedCertificates: [String: TrustedCertificate] = [:]
@@ -58,10 +59,16 @@ class TrustStore: ObservableObject {
do {
try persistTrustedCertificates()
AppGroup.appGroupUD.removeObject(forKey: trustedKeysKey)
notifyTrustedCertificatesDidChange()
} catch {
print("[TrustStore] Failed to save trusted certificates to keychain: \(error.localizedDescription)")
}
}
private func notifyTrustedCertificatesDidChange() {
NotificationCenter.default.post(name: Self.trustedCertificatesDidChange, object: self)
}
// MARK: - Public API