Fixes AltStore still being refreshing even after pledge expires

This commit is contained in:
Riley Testut
2023-11-30 15:14:01 -06:00
committed by Magesh K
parent e370034e0b
commit 850b6890e2
2 changed files with 33 additions and 8 deletions

View File

@@ -267,10 +267,13 @@ public extension InstalledApp
{
// Refresh AltStore last since it causes app to quit.
if let storeApp = altStoreApp.storeApp, !storeApp.isPledgeRequired || storeApp.isPledged
if let storeApp = altStoreApp.storeApp
{
// Only add AltStore if it's the public version OR if it's the beta and we're pledged to it.
installedApps.append(altStoreApp)
if !storeApp.isPledgeRequired || storeApp.isPledged
{
// Only add AltStore if it's the public version OR if it's the beta and we're pledged to it.
installedApps.append(altStoreApp)
}
}
else
{
@@ -302,10 +305,13 @@ public extension InstalledApp
if let altStoreApp = InstalledApp.fetchAltStore(in: context), altStoreApp.refreshedDate < date
{
if let storeApp = altStoreApp.storeApp, !storeApp.isPledgeRequired || storeApp.isPledged
if let storeApp = altStoreApp.storeApp
{
// Only add AltStore if it's the public version OR if it's the beta and we're pledged to it.
installedApps.append(altStoreApp)
if !storeApp.isPledgeRequired || storeApp.isPledged
{
// Only add AltStore if it's the public version OR if it's the beta and we're pledged to it.
installedApps.append(altStoreApp)
}
}
else
{