From 716cf3995ac1fe1581423cf2e757bcdffda9969f Mon Sep 17 00:00:00 2001 From: Petru Lingurar Date: Tue, 3 Sep 2019 10:56:05 +0300 Subject: [PATCH] Fix #4856 - Propagate LifecycleAwareFeature's onStart() to the inner feature FindInPageFeature is used inside the app as a LifecycleAwareFeature and as such it receives the onStart / onStop lifecycle calls. The onStart() lifecycle call would not get passed to the feature but in onStop() FindInPageFeature will detach it's Presenter and Interactor so when the user comes back to the screen she could not interact anymore with the feature. To fix this we'll propagate LifecycleAwareFeature's onStart() to the inner feature which is to rebind it's Presenter and Interactor in onStart(). This behavior is common to all the other features so all of them who implement LifecycleAwareFeature will now get the onStart() call also. --- .../java/org/mozilla/fenix/components/InflationAwareFeature.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/mozilla/fenix/components/InflationAwareFeature.kt b/app/src/main/java/org/mozilla/fenix/components/InflationAwareFeature.kt index c1cefa6b0..897e5357d 100644 --- a/app/src/main/java/org/mozilla/fenix/components/InflationAwareFeature.kt +++ b/app/src/main/java/org/mozilla/fenix/components/InflationAwareFeature.kt @@ -49,7 +49,7 @@ abstract class InflationAwareFeature( * when the view is inflated. */ override fun start() { - // We don't do anything because we only want to start the feature when it's being used. + feature?.start() } override fun stop() {