mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-18 03:03:31 +01:00
[AltStore] Limits background app refreshing to once every 6 hours
This commit is contained in:
@@ -99,7 +99,8 @@ extension InstalledApp
|
|||||||
|
|
||||||
class func fetchAppsForBackgroundRefresh(in context: NSManagedObjectContext) -> [InstalledApp]
|
class func fetchAppsForBackgroundRefresh(in context: NSManagedObjectContext) -> [InstalledApp]
|
||||||
{
|
{
|
||||||
let date = Date().addingTimeInterval(-120)
|
// Date 6 hours before now.
|
||||||
|
let date = Date().addingTimeInterval(-1 * 6 * 60 * 60)
|
||||||
|
|
||||||
let predicate = NSPredicate(format: "(%K < %@) AND (%K != %@)",
|
let predicate = NSPredicate(format: "(%K < %@) AND (%K != %@)",
|
||||||
#keyPath(InstalledApp.refreshedDate), date as NSDate,
|
#keyPath(InstalledApp.refreshedDate), date as NSDate,
|
||||||
|
|||||||
Reference in New Issue
Block a user