From d99225da1fff17337d47762c4dfe2635db725c32 Mon Sep 17 00:00:00 2001 From: Joshua Laymon <71040782+bogotesr@users.noreply.github.com> Date: Mon, 14 Nov 2022 17:36:23 -0700 Subject: [PATCH] Add files via upload Signed-off-by: Joshua Laymon <71040782+bogotesr@users.noreply.github.com> --- AltStore/Settings/AboutPatreonHeaderView.xib | 73 +++++++------------ AltStore/Settings/PatreonViewController.swift | 34 +++------ 2 files changed, 37 insertions(+), 70 deletions(-) diff --git a/AltStore/Settings/AboutPatreonHeaderView.xib b/AltStore/Settings/AboutPatreonHeaderView.xib index 833351fe..ae57d9b7 100644 --- a/AltStore/Settings/AboutPatreonHeaderView.xib +++ b/AltStore/Settings/AboutPatreonHeaderView.xib @@ -1,9 +1,9 @@ - + - + @@ -18,12 +18,12 @@ - + - + @@ -31,19 +31,19 @@ - + - + - - + - - - - - - - - - - + - Hey y'all! - -If you'd like to support my work, you can donate here. In return, you'll gain access to beta versions of all of my apps and be among the first to try the latest features. - -Thanks for all your support 💜 -Riley + Hello, thank you for using SideStore! + +If you would subscribe to the patreon that would support us and make sure we can continue developing SideStore for you. + +-SideTeam @@ -98,7 +89,7 @@ Riley - + - @@ -134,10 +114,8 @@ Riley - - @@ -146,10 +124,9 @@ Riley - - + - + diff --git a/AltStore/Settings/PatreonViewController.swift b/AltStore/Settings/PatreonViewController.swift index 10d0e5d2..316688e3 100644 --- a/AltStore/Settings/PatreonViewController.swift +++ b/AltStore/Settings/PatreonViewController.swift @@ -44,9 +44,9 @@ class PatreonViewController: UICollectionViewController self.collectionView.register(aboutHeaderNib, forSupplementaryViewOfKind: UICollectionView.elementKindSectionHeader, withReuseIdentifier: "AboutHeader") self.collectionView.register(PatronsHeaderView.self, forSupplementaryViewOfKind: UICollectionView.elementKindSectionHeader, withReuseIdentifier: "PatronsHeader") - self.collectionView.register(PatronsFooterView.self, forSupplementaryViewOfKind: UICollectionView.elementKindSectionFooter, withReuseIdentifier: "PatronsFooter") + //self.collectionView.register(PatronsFooterView.self, forSupplementaryViewOfKind: UICollectionView.elementKindSectionFooter, withReuseIdentifier: "PatronsFooter") - NotificationCenter.default.addObserver(self, selector: #selector(PatreonViewController.didUpdatePatrons(_:)), name: AppManager.didUpdatePatronsNotification, object: nil) + //NotificationCenter.default.addObserver(self, selector: #selector(PatreonViewController.didUpdatePatrons(_:)), name: AppManager.didUpdatePatronsNotification, object: nil) self.update() } @@ -55,7 +55,7 @@ class PatreonViewController: UICollectionViewController { super.viewWillAppear(animated) - self.fetchPatrons() + //self.fetchPatrons() self.update() } @@ -69,7 +69,7 @@ class PatreonViewController: UICollectionViewController var itemWidth = (self.collectionView.bounds.width - (layout.sectionInset.left + layout.sectionInset.right + layout.minimumInteritemSpacing)) / 2 itemWidth.round(.down) - layout.itemSize = CGSize(width: itemWidth, height: layout.itemSize.height) + layout.itemSize = CGSize(width: 0, height: 0) } } @@ -110,18 +110,16 @@ private extension PatreonViewController headerView.layoutMargins = self.view.layoutMargins headerView.supportButton.addTarget(self, action: #selector(PatreonViewController.openPatreonURL(_:)), for: .primaryActionTriggered) - headerView.accountButton.removeTarget(self, action: nil, for: .primaryActionTriggered) let defaultSupportButtonTitle = NSLocalizedString("Become a patron", comment: "") let isPatronSupportButtonTitle = NSLocalizedString("View Patreon", comment: "") let defaultText = NSLocalizedString(""" - Hey y'all, + Hello, thank you for using SideStore! - You can support future development of our apps by donating to us on Patreon. In return, you'll receive access to the beta versions of our apps and be among the first to try the latest features. + If you would subscribe to the patreon that would support us and make sure we can continue developing SideStore for you. - Thanks for all your support 💜 - Riley & Shane + -SideTeam """, comment: "") let isPatronText = NSLocalizedString(""" @@ -160,15 +158,7 @@ private extension PatreonViewController headerView.textView.text = defaultText } } - else - { - headerView.accountButton.addTarget(self, action: #selector(PatreonViewController.authenticate(_:)), for: .primaryActionTriggered) - - headerView.supportButton.setTitle(defaultSupportButtonTitle, for: .normal) - headerView.accountButton.setTitle(NSLocalizedString("Link Patreon account", comment: ""), for: .normal) - - headerView.textView.text = defaultText - } + } } @@ -182,7 +172,7 @@ private extension PatreonViewController @objc func openPatreonURL(_ sender: UIButton) { - let patreonURL = URL(string: "https://altstore.io/patreon")! + let patreonURL = URL(string: "https://www.patreon.com/JitStreamer")! let safariViewController = SFSafariViewController(url: patreonURL) safariViewController.preferredControlTintColor = self.view.tintColor @@ -276,7 +266,7 @@ extension PatreonViewController let footerView = collectionView.dequeueReusableSupplementaryView(ofKind: kind, withReuseIdentifier: "PatronsFooter", for: indexPath) as! PatronsFooterView footerView.button.isIndicatingActivity = false footerView.button.isHidden = false - footerView.button.addTarget(self, action: #selector(PatreonViewController.fetchPatrons), for: .primaryActionTriggered) + //footerView.button.addTarget(self, action: #selector(PatreonViewController.fetchPatrons), for: .primaryActionTriggered) if self.patronsDataSource.itemCount > 0 { @@ -316,7 +306,7 @@ extension PatreonViewController: UICollectionViewDelegateFlowLayout return size case .patrons: - return CGSize(width: 320, height: 20) + return CGSize(width: 0, height: 0) } } @@ -326,7 +316,7 @@ extension PatreonViewController: UICollectionViewDelegateFlowLayout switch section { case .about: return .zero - case .patrons: return CGSize(width: 320, height: 20) + case .patrons: return CGSize(width: 0, height: 0) } } }