Change Patreon screen again

Refresh to "support us" and include social media.
This commit is contained in:
bogotesr
2023-06-13 23:14:01 -07:00
parent e02453598c
commit 183e185812
8 changed files with 268 additions and 50 deletions

View File

@@ -111,7 +111,9 @@ private extension PatreonViewController
headerView.layoutMargins = self.view.layoutMargins
headerView.supportButton.addTarget(self, action: #selector(PatreonViewController.openPatreonURL(_:)), for: .primaryActionTriggered)
headerView.twitterButton.addTarget(self, action: #selector(PatreonViewController.openTwitterURL(_:)), for: .primaryActionTriggered)
headerView.instagramButton.addTarget(self, action: #selector(PatreonViewController.openInstagramURL(_:)), for: .primaryActionTriggered)
let defaultSupportButtonTitle = NSLocalizedString("Become a patron", comment: "")
let isPatronSupportButtonTitle = NSLocalizedString("View Patreon", comment: "")
@@ -180,6 +182,24 @@ private extension PatreonViewController
self.present(safariViewController, animated: true, completion: nil)
}
@objc func openTwitterURL(_ sender: UIButton)
{
let twitterURL = URL(string: "https://twitter.com/SideStore_io")!
let safariViewController = SFSafariViewController(url: twitterURL)
safariViewController.preferredControlTintColor = self.view.tintColor
self.present(safariViewController, animated: true, completion: nil)
}
@objc func openInstagramURL(_ sender: UIButton)
{
let twitterURL = URL(string: "https://instagram.com/sidestore.io")!
let safariViewController = SFSafariViewController(url: twitterURL)
safariViewController.preferredControlTintColor = self.view.tintColor
self.present(safariViewController, animated: true, completion: nil)
}
@IBAction func authenticate(_ sender: UIBarButtonItem)
{
PatreonAPI.shared.authenticate { (result) in