Hides “UPDATE” option for Patreon apps with expired pledges

This commit is contained in:
Riley Testut
2023-12-01 16:42:49 -06:00
committed by Magesh K
parent 0ad9ceaa95
commit cccbe3a80b
2 changed files with 3 additions and 3 deletions

View File

@@ -348,7 +348,7 @@ private extension AppViewController
{
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.
buttonAction = .update
@@ -492,7 +492,7 @@ extension AppViewController
{
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)
}