For #18034 - Don't animate the toolbar while the tab is loading

Use the new controller offered by AC to resolve some browser layout issues and
also offer an experience consistent with that of other browsers.
upstream-sync
Mugurell 3 years ago
parent 57b7601752
commit cf483ef580

@ -19,6 +19,7 @@ import mozilla.components.concept.engine.Engine
import mozilla.components.concept.storage.HistoryStorage
import mozilla.components.feature.tabs.toolbar.TabCounterToolbarButton
import mozilla.components.feature.toolbar.ToolbarAutocompleteFeature
import mozilla.components.feature.toolbar.ToolbarBehaviorController
import mozilla.components.feature.toolbar.ToolbarFeature
import mozilla.components.feature.toolbar.ToolbarPresenter
import mozilla.components.support.base.feature.LifecycleAwareFeature
@ -53,6 +54,8 @@ abstract class ToolbarIntegration(
private val menuPresenter =
MenuPresenter(toolbar, context.components.core.store, sessionId)
private val toolbarController = ToolbarBehaviorController(toolbar, store, sessionId)
init {
toolbar.display.menuBuilder = toolbarMenu.menuBuilder
toolbar.private = isPrivate
@ -61,11 +64,13 @@ abstract class ToolbarIntegration(
override fun start() {
menuPresenter.start()
toolbarPresenter.start()
toolbarController.start()
}
override fun stop() {
menuPresenter.stop()
toolbarPresenter.stop()
toolbarController.stop()
}
fun invalidateMenu() {

Loading…
Cancel
Save