For #15116: Do not expand toolbar on PWA tabs.
This commit is contained in:
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 kotlinx.android.synthetic.main.component_browser_top_toolbar.view.*
|
||||||
import mozilla.components.browser.domains.autocomplete.ShippedDomainsProvider
|
import mozilla.components.browser.domains.autocomplete.ShippedDomainsProvider
|
||||||
import mozilla.components.browser.session.Session
|
import mozilla.components.browser.session.Session
|
||||||
|
import mozilla.components.browser.state.state.ExternalAppType
|
||||||
import mozilla.components.browser.toolbar.BrowserToolbar
|
import mozilla.components.browser.toolbar.BrowserToolbar
|
||||||
import mozilla.components.browser.toolbar.behavior.BrowserToolbarBottomBehavior
|
import mozilla.components.browser.toolbar.behavior.BrowserToolbarBottomBehavior
|
||||||
import mozilla.components.browser.toolbar.display.DisplayToolbar
|
import mozilla.components.browser.toolbar.display.DisplayToolbar
|
||||||
|
@ -77,6 +78,9 @@ class BrowserToolbarView(
|
||||||
|
|
||||||
val toolbarIntegration: ToolbarIntegration
|
val toolbarIntegration: ToolbarIntegration
|
||||||
|
|
||||||
|
private val isPwaTab: Boolean
|
||||||
|
get() = customTabSession?.customTabConfig?.externalAppType == ExternalAppType.PROGRESSIVE_WEB_APP
|
||||||
|
|
||||||
init {
|
init {
|
||||||
val isCustomTabSession = customTabSession != null
|
val isCustomTabSession = customTabSession != null
|
||||||
|
|
||||||
|
@ -208,6 +212,10 @@ class BrowserToolbarView(
|
||||||
}
|
}
|
||||||
|
|
||||||
fun expand() {
|
fun expand() {
|
||||||
|
// expand only for normal tabs and custom tabs not for PWA
|
||||||
|
if (isPwaTab) {
|
||||||
|
return
|
||||||
|
}
|
||||||
when (settings.toolbarPosition) {
|
when (settings.toolbarPosition) {
|
||||||
ToolbarPosition.BOTTOM -> {
|
ToolbarPosition.BOTTOM -> {
|
||||||
(view.layoutParams as? CoordinatorLayout.LayoutParams)?.apply {
|
(view.layoutParams as? CoordinatorLayout.LayoutParams)?.apply {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user