Bug 1883753 - Remove menu from custom tab bar

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

@ -27,6 +27,7 @@ class CustomTabsIntegration(
shouldReverseItems: Boolean,
isSandboxCustomTab: Boolean,
isPrivate: Boolean,
isNavBarEnabled: Boolean,
) : LifecycleAwareFeature, UserInteractionHandler {
init {
@ -68,6 +69,7 @@ class CustomTabsIntegration(
closeListener = { activity.finishAndRemoveTask() },
updateTheme = !isPrivate,
forceActionButtonTinting = isPrivate,
isNavBarEnabled = isNavBarEnabled,
)
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.CustomTabContextMenuCandidate
import org.mozilla.fenix.browser.FenixSnackbarDelegate
import org.mozilla.fenix.components.toolbar.IncompleteRedesignToolbarFeature
import org.mozilla.fenix.ext.components
import org.mozilla.fenix.ext.nav
import org.mozilla.fenix.ext.requireComponents
@ -59,6 +60,8 @@ class ExternalAppBrowserFragment : BaseBrowserFragment() {
val manifest =
args.webAppManifest?.let { json -> WebAppManifestParser().parse(json).getOrNull() }
val isNavBarEnabled = IncompleteRedesignToolbarFeature(requireContext().settings()).isEnabled
customTabsIntegration.set(
feature = CustomTabsIntegration(
store = requireComponents.core.store,
@ -70,6 +73,7 @@ class ExternalAppBrowserFragment : BaseBrowserFragment() {
isPrivate = tab.content.private,
shouldReverseItems = !activity.settings().shouldUseBottomToolbar,
isSandboxCustomTab = args.isSandboxCustomTab,
isNavBarEnabled = isNavBarEnabled,
),
owner = this,
view = view,

Loading…
Cancel
Save