refactor: Disable shake in subscriptions

This commit is contained in:
Andrea Busi
2021-02-27 22:58:09 +01:00
parent 849170cd2b
commit e43e187d84
@@ -13,6 +13,9 @@ import StoreKit
class SubscriptionDetailViewController: UIViewController {
/// Enable this allows shake to enable the current subscription
private static let ShareToEnableSubscription = false
var product: SKProduct? {
didSet {
updateUI()
@@ -122,12 +125,8 @@ class SubscriptionDetailViewController: UIViewController {
extension SubscriptionDetailViewController {
override var canBecomeFirstResponder: Bool {
false
}
override func motionEnded(_ motion: UIEvent.EventSubtype, with event: UIEvent?) {
guard let product = product, event?.subtype == .motionShake else {
guard let product = product, event?.subtype == .motionShake, Self.ShareToEnableSubscription else {
return
}