mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 06:43:25 +01:00
Hides “UPDATE” option for Patreon apps with expired pledges
This commit is contained in:
@@ -348,7 +348,7 @@ private extension AppViewController
|
|||||||
{
|
{
|
||||||
var buttonAction: AppBannerView.AppAction?
|
var buttonAction: AppBannerView.AppAction?
|
||||||
|
|
||||||
if let installedApp = self.app.installedApp, let latestVersion = self.app.latestAvailableVersion, !installedApp.matches(latestVersion)
|
if let installedApp = self.app.installedApp, let latestVersion = self.app.latestAvailableVersion, !installedApp.matches(latestVersion), !self.app.isPledgeRequired || self.app.isPledged
|
||||||
{
|
{
|
||||||
// Explicitly set button action to .update if there is an update available, even if it's not supported.
|
// Explicitly set button action to .update if there is an update available, even if it's not supported.
|
||||||
buttonAction = .update
|
buttonAction = .update
|
||||||
@@ -492,7 +492,7 @@ extension AppViewController
|
|||||||
{
|
{
|
||||||
if let installedApp = self.app.installedApp
|
if let installedApp = self.app.installedApp
|
||||||
{
|
{
|
||||||
if let latestVersion = self.app.latestAvailableVersion, !installedApp.matches(latestVersion)
|
if let latestVersion = self.app.latestAvailableVersion, !installedApp.matches(latestVersion), !self.app.isPledgeRequired || self.app.isPledged
|
||||||
{
|
{
|
||||||
self.updateApp(installedApp, to: latestVersion)
|
self.updateApp(installedApp, to: latestVersion)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -182,7 +182,7 @@ extension AppBannerView
|
|||||||
{
|
{
|
||||||
// App is installed
|
// App is installed
|
||||||
|
|
||||||
if installedApp.isUpdateAvailable
|
if installedApp.isUpdateAvailable && (!storeApp.isPledgeRequired || storeApp.isPledged)
|
||||||
{
|
{
|
||||||
buttonAction = .update
|
buttonAction = .update
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user