diff --git a/packages/flutter_mozilla_components/android/src/main/kotlin/eu/weblibre/flutter_mozilla_components/integration/ReaderViewIntegration.kt b/packages/flutter_mozilla_components/android/src/main/kotlin/eu/weblibre/flutter_mozilla_components/integration/ReaderViewIntegration.kt index 374293d4..357474fc 100644 --- a/packages/flutter_mozilla_components/android/src/main/kotlin/eu/weblibre/flutter_mozilla_components/integration/ReaderViewIntegration.kt +++ b/packages/flutter_mozilla_components/android/src/main/kotlin/eu/weblibre/flutter_mozilla_components/integration/ReaderViewIntegration.kt @@ -27,7 +27,7 @@ class ReaderViewIntegration( engine: Engine, store: BrowserStore, view: ReaderViewControlsView, - readerViewEvents: ReaderViewEventsImpl, + private val readerViewEvents: ReaderViewEventsImpl, readerViewController: ReaderViewController ) : LifecycleAwareFeature, UserInteractionHandler { @@ -69,6 +69,7 @@ class ReaderViewIntegration( } override fun stop() { + readerViewEvents.removeListener(controllerListener) feature.stop() }