Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

fix: dispose of previous applaunch tasks (#4631)

Mathias Mogensena3a5709b70b7
diff --git a/frontend/appflowy_flutter/lib/startup/startup.dart b/frontend/appflowy_flutter/lib/startup/startup.dart
index e7422ded8f..4b5c973468 100644
--- a/frontend/appflowy_flutter/lib/startup/startup.dart
+++ b/frontend/appflowy_flutter/lib/startup/startup.dart
@@ -76,6 +76,11 @@ class FlowyRunner {
IntegrationTestHelper.rustEnvsBuilder = rustEnvsBuilder;
}
+ // Clear and dispose tasks from previous AppLaunch
+ if (getIt.isRegistered(instance: AppLauncher)) {
+ await getIt<AppLauncher>().dispose();
+ }
+
// Clear all the states in case of rebuilding.
await getIt.reset();