refactor: Disable shake in subscriptions
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user