[fenix] Fix https://github.com/mozilla-mobile/fenix/issues/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.
pull/600/head
Petru Lingurar 5 years ago committed by Jonathan Almeida
parent 3312a8c307
commit c6f298f9fb

@ -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() {

Loading…
Cancel
Save