From cb929dd60dc81b7ab8c1ce4b95015d8231b0e3f4 Mon Sep 17 00:00:00 2001 From: Fabian Freund Date: Sat, 3 May 2025 23:45:39 +0200 Subject: [PATCH] fix initialization --- .../eu/lensai/flutter_mozilla_components/GlobalComponents.kt | 3 +-- .../flutter_mozilla_components/api/GeckoBrowserApiImpl.kt | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/flutter_mozilla_components/android/src/main/kotlin/eu/lensai/flutter_mozilla_components/GlobalComponents.kt b/packages/flutter_mozilla_components/android/src/main/kotlin/eu/lensai/flutter_mozilla_components/GlobalComponents.kt index c0759901..96e8003e 100644 --- a/packages/flutter_mozilla_components/android/src/main/kotlin/eu/lensai/flutter_mozilla_components/GlobalComponents.kt +++ b/packages/flutter_mozilla_components/android/src/main/kotlin/eu/lensai/flutter_mozilla_components/GlobalComponents.kt @@ -59,6 +59,7 @@ object GlobalComponents { tabContentEvents, extensionEvents ) + _components = newComponents //newComponents.crashReporter.install(applicationContext) @@ -109,7 +110,5 @@ object GlobalComponents { GlobalScope.launch(Dispatchers.IO) { newComponents.core.fileUploadsDirCleaner.cleanUploadsDirectory() } - - _components = newComponents } } \ No newline at end of file diff --git a/packages/flutter_mozilla_components/android/src/main/kotlin/eu/lensai/flutter_mozilla_components/api/GeckoBrowserApiImpl.kt b/packages/flutter_mozilla_components/android/src/main/kotlin/eu/lensai/flutter_mozilla_components/api/GeckoBrowserApiImpl.kt index 3203f495..8ca5b20b 100644 --- a/packages/flutter_mozilla_components/android/src/main/kotlin/eu/lensai/flutter_mozilla_components/api/GeckoBrowserApiImpl.kt +++ b/packages/flutter_mozilla_components/android/src/main/kotlin/eu/lensai/flutter_mozilla_components/api/GeckoBrowserApiImpl.kt @@ -64,6 +64,8 @@ class GeckoBrowserApiImpl : GeckoBrowserApi { fun attachBinding(flutterPluginBinding: FlutterPluginBinding) { _flutterPluginBinding = flutterPluginBinding _flutterEvents = GeckoStateEvents(_flutterPluginBinding.binaryMessenger) + + isGeckoInitialized = false } fun attachActivity(activity: Activity) {