From 9db8df68dda104f485d21afd2a221adb1891fbcf Mon Sep 17 00:00:00 2001 From: Xin Liu Date: Sun, 11 Aug 2024 00:50:29 -0700 Subject: [PATCH] Start aggregation after app started for 15 seconds --- Planet/PlanetAppDelegate.swift | 7 +++++++ Planet/versioning.xcconfig | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Planet/PlanetAppDelegate.swift b/Planet/PlanetAppDelegate.swift index 91d9ac6c..bc8583a2 100644 --- a/Planet/PlanetAppDelegate.swift +++ b/Planet/PlanetAppDelegate.swift @@ -126,6 +126,13 @@ class PlanetAppDelegate: NSObject, NSApplicationDelegate { debugPrint("WalletConnect 2.0 Failed to prepare the connection: \(error)") } } + + // Aggregate after app started for 15 seconds + DispatchQueue.main.asyncAfter(deadline: .now() + 15) { + Task.detached(priority: .background) { + await PlanetStore.shared.aggregate() + } + } } func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { diff --git a/Planet/versioning.xcconfig b/Planet/versioning.xcconfig index e3633778..9b95ee4d 100644 --- a/Planet/versioning.xcconfig +++ b/Planet/versioning.xcconfig @@ -1 +1 @@ -CURRENT_PROJECT_VERSION = 2202 +CURRENT_PROJECT_VERSION = 2203