mirror of
https://github.com/leonboe1/QuickDrop.git
synced 2026-11-11 02:51:11 +00:00
Refactoring UserDefaults
This commit is contained in:
1 parent
943414db58
commit
11afc232ab
12 files changed
+159
-79
No files matched your search
@@ -174,7 +174,7 @@ class ReceiveModel: ObservableObject, InboundAppDelegate {
|
||||
showCopiedToClipboardAlert()
|
||||
}
|
||||
|
||||
let currentCount = incomingTransmissionCount()
|
||||
let currentCount = Settings.shared.incomingTransmissionCount
|
||||
|
||||
#if os(macOS)
|
||||
if currentCount == 0 {
|
||||
@@ -184,7 +184,7 @@ class ReceiveModel: ObservableObject, InboundAppDelegate {
|
||||
}
|
||||
#endif
|
||||
|
||||
UserDefaults.standard.set(currentCount + 1, forKey: UserDefaultsKeys.transmissionCount.rawValue)
|
||||
Settings.shared.incomingTransmissionCount = currentCount + 1
|
||||
log("[ReceiveModel] Successful transmission. Current count: \(currentCount)")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user