From 6d96bf414fa1253c2cc37dcff31e4ebfcb6921e3 Mon Sep 17 00:00:00 2001 From: Nythepegasus Date: Mon, 10 Jul 2023 14:32:41 -0400 Subject: [PATCH] These vars don't change, let's use let keyword --- AltStoreCore/Model/InstalledApp.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AltStoreCore/Model/InstalledApp.swift b/AltStoreCore/Model/InstalledApp.swift index 77c49513..f59d05d0 100644 --- a/AltStoreCore/Model/InstalledApp.swift +++ b/AltStoreCore/Model/InstalledApp.swift @@ -192,7 +192,7 @@ public extension InstalledApp class func fetchAppsForRefreshingAll(in context: NSManagedObjectContext) -> [InstalledApp] { - var predicate = NSPredicate(format: "%K == YES AND %K != %@", #keyPath(InstalledApp.isActive), #keyPath(InstalledApp.bundleIdentifier), StoreApp.altstoreAppID) + let predicate = NSPredicate(format: "%K == YES AND %K != %@", #keyPath(InstalledApp.isActive), #keyPath(InstalledApp.bundleIdentifier), StoreApp.altstoreAppID) print("Fetch Apps for Refreshing All 'AltStore' predicate: \(String(describing: predicate))") // if let patreonAccount = DatabaseManager.shared.patreonAccount(in: context), patreonAccount.isPatron, PatreonAPI.shared.isAuthenticated @@ -223,7 +223,7 @@ public extension InstalledApp // Date 6 hours before now. let date = Date().addingTimeInterval(-1 * 6 * 60 * 60) - var predicate = NSPredicate(format: "(%K == YES) AND (%K < %@) AND (%K != %@)", + let predicate = NSPredicate(format: "(%K == YES) AND (%K < %@) AND (%K != %@)", #keyPath(InstalledApp.isActive), #keyPath(InstalledApp.refreshedDate), date as NSDate, #keyPath(InstalledApp.bundleIdentifier), StoreApp.altstoreAppID)