1
0
Fork 0

For #6992 Always hide toolbar when showing find in page bar (#7567)

master
Mihai Adrian 2020-01-09 23:26:33 +02:00 committed by Sawyer Blatz
parent 666b3d9627
commit 0a412a1a6a
1 changed files with 2 additions and 6 deletions

View File

@ -7,7 +7,6 @@ package org.mozilla.fenix.components
import android.view.View
import android.view.ViewStub
import mozilla.components.browser.state.selector.findCustomTabOrSelectedTab
import mozilla.components.browser.state.state.CustomTabSessionState
import mozilla.components.browser.state.store.BrowserStore
import mozilla.components.browser.toolbar.BrowserToolbar
import mozilla.components.concept.engine.EngineView
@ -33,11 +32,8 @@ class FindInPageIntegration(
override fun onLaunch(view: View, feature: LifecycleAwareFeature) {
store.state.findCustomTabOrSelectedTab(sessionId)?.let { tab ->
if (tab !is CustomTabSessionState) {
// Hide the toolbar to display find in page query (only
// needs to be done for regular tabs with bottom toolbar).
toolbar.visibility = View.GONE
}
// Always hide the toolbar and display find in page query
toolbar.visibility = View.GONE
view.visibility = View.VISIBLE
(feature as FindInPageFeature).bind(tab)
view.layoutParams.height = toolbar.height