mirror of
https://github.com/leonboe1/QuickDrop.git
synced 2026-11-11 19:11:10 +00:00
Refactoring
This commit is contained in:
1 parent
ebfe2c3832
commit
fad0022b3a
3 files changed
+4
-4
No files matched your search
@@ -111,10 +111,10 @@ public func isPlusVersion() -> Bool {
|
||||
|
||||
|
||||
public func isFileTransferRestricted() -> Bool {
|
||||
(!isPlusVersion() && transmissionCount() > 1)
|
||||
(!isPlusVersion() && incomingTransmissionCount() > 1)
|
||||
}
|
||||
|
||||
|
||||
public func transmissionCount() -> Int {
|
||||
public func incomingTransmissionCount() -> Int {
|
||||
return UserDefaults.standard.integer(forKey: UserDefaultsKeys.transmissionCount.rawValue)
|
||||
}
|
||||
@@ -428,7 +428,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCenterDele
|
||||
showCopiedToClipboardAlert()
|
||||
}
|
||||
|
||||
let currentCount = transmissionCount()
|
||||
let currentCount = incomingTransmissionCount()
|
||||
if currentCount == 0 {
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
|
||||
SKStoreReviewController.requestReview()
|
||||
|
||||
@@ -84,7 +84,7 @@ class ErrorAlertHandler {
|
||||
|
||||
let title = String(format: "TransferError".localized(), arguments: [deviceName])
|
||||
log("Showing alert with title: \"\(title)\" and description: \"\(description)\"")
|
||||
log("Unsuccessful transmission. Already successful transmissions: \(transmissionCount())")
|
||||
log("Unsuccessful transmission. Already successful transmissions: \(incomingTransmissionCount())")
|
||||
|
||||
#if os(macOS)
|
||||
self.isAlertShown = true
|
||||
|
||||
Reference in new issue
Block a user