Bug 1883753 - Remove menu from custom tab bar

fenix/125.0
sarah541 4 months ago committed by mergify[bot]
parent f86c484851
commit 2a5f1a8b36

@ -27,6 +27,7 @@ class CustomTabsIntegration(
shouldReverseItems: Boolean, shouldReverseItems: Boolean,
isSandboxCustomTab: Boolean, isSandboxCustomTab: Boolean,
isPrivate: Boolean, isPrivate: Boolean,
isNavBarEnabled: Boolean,
) : LifecycleAwareFeature, UserInteractionHandler { ) : LifecycleAwareFeature, UserInteractionHandler {
init { init {
@ -68,6 +69,7 @@ class CustomTabsIntegration(
closeListener = { activity.finishAndRemoveTask() }, closeListener = { activity.finishAndRemoveTask() },
updateTheme = !isPrivate, updateTheme = !isPrivate,
forceActionButtonTinting = isPrivate, forceActionButtonTinting = isPrivate,
isNavBarEnabled = isNavBarEnabled,
) )
override fun start() = feature.start() override fun start() = feature.start()

@ -30,6 +30,7 @@ import org.mozilla.fenix.R
import org.mozilla.fenix.browser.BaseBrowserFragment import org.mozilla.fenix.browser.BaseBrowserFragment
import org.mozilla.fenix.browser.CustomTabContextMenuCandidate import org.mozilla.fenix.browser.CustomTabContextMenuCandidate
import org.mozilla.fenix.browser.FenixSnackbarDelegate import org.mozilla.fenix.browser.FenixSnackbarDelegate
import org.mozilla.fenix.components.toolbar.IncompleteRedesignToolbarFeature
import org.mozilla.fenix.ext.components import org.mozilla.fenix.ext.components
import org.mozilla.fenix.ext.nav import org.mozilla.fenix.ext.nav
import org.mozilla.fenix.ext.requireComponents import org.mozilla.fenix.ext.requireComponents
@ -59,6 +60,8 @@ class ExternalAppBrowserFragment : BaseBrowserFragment() {
val manifest = val manifest =
args.webAppManifest?.let { json -> WebAppManifestParser().parse(json).getOrNull() } args.webAppManifest?.let { json -> WebAppManifestParser().parse(json).getOrNull() }
val isNavBarEnabled = IncompleteRedesignToolbarFeature(requireContext().settings()).isEnabled
customTabsIntegration.set( customTabsIntegration.set(
feature = CustomTabsIntegration( feature = CustomTabsIntegration(
store = requireComponents.core.store, store = requireComponents.core.store,
@ -70,6 +73,7 @@ class ExternalAppBrowserFragment : BaseBrowserFragment() {
isPrivate = tab.content.private, isPrivate = tab.content.private,
shouldReverseItems = !activity.settings().shouldUseBottomToolbar, shouldReverseItems = !activity.settings().shouldUseBottomToolbar,
isSandboxCustomTab = args.isSandboxCustomTab, isSandboxCustomTab = args.isSandboxCustomTab,
isNavBarEnabled = isNavBarEnabled,
), ),
owner = this, owner = this,
view = view, view = view,

Loading…
Cancel
Save