For #15116: Do not expand toolbar on PWA tabs.

pull/128/head^2
mcarare 4 years ago committed by ekager
parent 1f004aff8c
commit c5a2e2e5a0

@ -23,6 +23,7 @@ import kotlinx.android.synthetic.main.component_browser_top_toolbar.*
import kotlinx.android.synthetic.main.component_browser_top_toolbar.view.*
import mozilla.components.browser.domains.autocomplete.ShippedDomainsProvider
import mozilla.components.browser.session.Session
import mozilla.components.browser.state.state.ExternalAppType
import mozilla.components.browser.toolbar.BrowserToolbar
import mozilla.components.browser.toolbar.behavior.BrowserToolbarBottomBehavior
import mozilla.components.browser.toolbar.display.DisplayToolbar
@ -77,6 +78,9 @@ class BrowserToolbarView(
val toolbarIntegration: ToolbarIntegration
private val isPwaTab: Boolean
get() = customTabSession?.customTabConfig?.externalAppType == ExternalAppType.PROGRESSIVE_WEB_APP
init {
val isCustomTabSession = customTabSession != null
@ -208,6 +212,10 @@ class BrowserToolbarView(
}
fun expand() {
// expand only for normal tabs and custom tabs not for PWA
if (isPwaTab) {
return
}
when (settings.toolbarPosition) {
ToolbarPosition.BOTTOM -> {
(view.layoutParams as? CoordinatorLayout.LayoutParams)?.apply {

Loading…
Cancel
Save