mirror of
https://github.com/leonboe1/QuickDrop.git
synced 2026-11-22 06:15:59 +00:00
Only request review every 20 incoming shares
This commit is contained in:
1 parent
83468e46f7
commit
583a377655
1 file changed
+8
-2
@@ -201,9 +201,15 @@ class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCenterDele
|
|||||||
UNUserNotificationCenter.current().removeDeliveredNotifications(withIdentifiers: ["transfer_"+id])
|
UNUserNotificationCenter.current().removeDeliveredNotifications(withIdentifiers: ["transfer_"+id])
|
||||||
self.activeIncomingTransfers.removeValue(forKey: id)
|
self.activeIncomingTransfers.removeValue(forKey: id)
|
||||||
|
|
||||||
DispatchQueue.main.asyncAfter(deadline: .now() + 2) {
|
let currentCount = UserDefaults.standard.integer(forKey: "reviewRequestCountKey")
|
||||||
SKStoreReviewController.requestReview()
|
|
||||||
|
if currentCount % 20 == 0 {
|
||||||
|
DispatchQueue.main.asyncAfter(deadline: .now() + 2) {
|
||||||
|
SKStoreReviewController.requestReview()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UserDefaults.standard.set(currentCount + 1, forKey: "reviewRequestCountKey")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user