Skip to content

Commit

Permalink
Merge pull request #1501 from Automattic/lantean/1499-ipad-crash
Browse files Browse the repository at this point in the history
UIAlertController+Sustainer: Switching to Alert
  • Loading branch information
jleandroperez authored Nov 15, 2022
2 parents 613133e + 8802f0f commit 87c33f4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Simplenote/UIAlertController+Sustainer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ extension UIAlertController {
let monthlyActionTitle = Localization.monthlyActionTitle(price: manager.displayPrice(for: .sustainerMonthly))
let yearlyActionTitle = Localization.yearlyActionTitle(price: manager.displayPrice(for: .sustainerYearly))

let alert = UIAlertController(title: Localization.title, message: Localization.message, preferredStyle: .actionSheet)
let style: UIAlertController.Style = UIDevice.isPad ? .alert : .actionSheet
let alert = UIAlertController(title: Localization.title, message: Localization.message, preferredStyle: style)
alert.addActionWithTitle(monthlyActionTitle, style: .default) { _ in
SPTracker.trackSustainerMonthlyButtonTapped()
manager.purchase(storeProduct: .sustainerMonthly)
Expand Down

0 comments on commit 87c33f4

Please sign in to comment.