Updates apps’ pledge status upon (de-)authenticating with Patreon

No longer deactivates apps whenever pledge expires.
This commit is contained in:
Riley Testut
2023-11-29 17:37:21 -06:00
committed by Magesh K
parent 947b31881f
commit 9f7f73f835
2 changed files with 17 additions and 12 deletions

View File

@@ -208,8 +208,21 @@ private extension PatreonViewController
let account = try result.get()
try account.managedObjectContext?.save()
DispatchQueue.main.async {
self.update()
// Update sources to show any Patreon-only apps.
AppManager.shared.fetchSources { result in
do
{
let (_, context) = try result.get()
try context.save()
}
catch
{
Logger.main.error("Failed to update sources after authenticating Patreon account. \(error.localizedDescription, privacy: .public)")
}
DispatchQueue.main.async {
self.update()
}
}
}
catch is CancellationError