mirror of
https://github.com/leonboe1/QuickDrop.git
synced 2026-11-22 22:36:01 +00:00
Only poll clipboard if clipboard sync was enabled
This commit is contained in:
1 parent
72bfd88161
commit
488f1a14b2
2 files changed
+65
-7
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user