2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-19 09:25:34 +00:00

[fenix] Closes https://github.com/mozilla-mobile/fenix/issues/1043 - Remove redundant CustomTabsToolbarFeature

This commit is contained in:
Emily Kager 2019-03-15 15:10:13 -07:00 committed by Colin Lee
parent df846dff4f
commit 89bffe4990

View File

@ -24,7 +24,6 @@ import kotlinx.android.synthetic.main.fragment_browser.view.*
import mozilla.components.browser.toolbar.behavior.BrowserToolbarBottomBehavior
import mozilla.components.feature.contextmenu.ContextMenuCandidate
import mozilla.components.feature.contextmenu.ContextMenuFeature
import mozilla.components.feature.customtabs.CustomTabsToolbarFeature
import mozilla.components.feature.downloads.DownloadsFeature
import mozilla.components.feature.prompts.PromptFeature
import mozilla.components.feature.session.FullScreenFeature
@ -63,7 +62,6 @@ class BrowserFragment : Fragment(), BackHandler {
private val downloadsFeature = ViewBoundFeatureWrapper<DownloadsFeature>()
private val promptsFeature = ViewBoundFeatureWrapper<PromptFeature>()
private val findInPageIntegration = ViewBoundFeatureWrapper<FindInPageIntegration>()
private val customTabsToolbarFeature = ViewBoundFeatureWrapper<CustomTabsToolbarFeature>()
private val toolbarIntegration = ViewBoundFeatureWrapper<ToolbarIntegration>()
private val sitePermissionsFeature = ViewBoundFeatureWrapper<SitePermissionsFeature>()
private val fullScreenFeature = ViewBoundFeatureWrapper<FullScreenFeature>()
@ -168,15 +166,6 @@ class BrowserFragment : Fragment(), BackHandler {
owner = this,
view = view)
customTabsToolbarFeature.set(
feature = CustomTabsToolbarFeature(
sessionManager,
toolbarComponent.getView(),
sessionId,
closeListener = { requireActivity().finish() }),
owner = this,
view = view)
toolbarIntegration.set(
feature = (toolbarComponent.uiView as ToolbarUIView).toolbarIntegration,
owner = this,
@ -260,7 +249,7 @@ class BrowserFragment : Fragment(), BackHandler {
return when {
findInPageIntegration.onBackPressed() -> true
sessionFeature.onBackPressed() -> true
customTabsToolbarFeature.onBackPressed() -> true
customTabsIntegration.onBackPressed() -> true
else -> false
}
}