mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-20 20:23:25 +01:00
Re-enables checking if Patreon account is a patron
This commit is contained in:
@@ -151,7 +151,7 @@ private extension BrowseViewController
|
|||||||
|
|
||||||
func updateDataSource()
|
func updateDataSource()
|
||||||
{
|
{
|
||||||
if let patreonAccount = DatabaseManager.shared.patreonAccount(), patreonAccount.isPatron
|
if let patreonAccount = DatabaseManager.shared.patreonAccount(), patreonAccount.isPatron, PatreonAPI.shared.isAuthenticated
|
||||||
{
|
{
|
||||||
self.dataSource.predicate = nil
|
self.dataSource.predicate = nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ extension InstalledApp
|
|||||||
{
|
{
|
||||||
var predicate = NSPredicate(format: "%K != %@", #keyPath(InstalledApp.bundleIdentifier), StoreApp.altstoreAppID)
|
var predicate = NSPredicate(format: "%K != %@", #keyPath(InstalledApp.bundleIdentifier), StoreApp.altstoreAppID)
|
||||||
|
|
||||||
if let patreonAccount = DatabaseManager.shared.patreonAccount(in: context), patreonAccount.isPatron
|
if let patreonAccount = DatabaseManager.shared.patreonAccount(in: context), patreonAccount.isPatron, PatreonAPI.shared.isAuthenticated
|
||||||
{
|
{
|
||||||
// No additional predicate
|
// No additional predicate
|
||||||
}
|
}
|
||||||
@@ -116,7 +116,7 @@ extension InstalledApp
|
|||||||
#keyPath(InstalledApp.refreshedDate), date as NSDate,
|
#keyPath(InstalledApp.refreshedDate), date as NSDate,
|
||||||
#keyPath(InstalledApp.bundleIdentifier), StoreApp.altstoreAppID)
|
#keyPath(InstalledApp.bundleIdentifier), StoreApp.altstoreAppID)
|
||||||
|
|
||||||
if let patreonAccount = DatabaseManager.shared.patreonAccount(in: context), patreonAccount.isPatron
|
if let patreonAccount = DatabaseManager.shared.patreonAccount(in: context), patreonAccount.isPatron, PatreonAPI.shared.isAuthenticated
|
||||||
{
|
{
|
||||||
// No additional predicate
|
// No additional predicate
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,12 +54,12 @@ class PatreonAccount: NSManagedObject, Fetchable
|
|||||||
|
|
||||||
if let patronResponse = response.included?.first
|
if let patronResponse = response.included?.first
|
||||||
{
|
{
|
||||||
_ = Patron(response: patronResponse)
|
let patron = Patron(response: patronResponse)
|
||||||
self.isPatron = true
|
self.isPatron = (patron.status == .active)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
self.isPatron = true
|
self.isPatron = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -320,7 +320,7 @@ private extension MyAppsViewController
|
|||||||
|
|
||||||
func updateDataSource()
|
func updateDataSource()
|
||||||
{
|
{
|
||||||
if let patreonAccount = DatabaseManager.shared.patreonAccount(), patreonAccount.isPatron
|
if let patreonAccount = DatabaseManager.shared.patreonAccount(), patreonAccount.isPatron, PatreonAPI.shared.isAuthenticated
|
||||||
{
|
{
|
||||||
self.dataSource.predicate = nil
|
self.dataSource.predicate = nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user