Closes #1043 - Remove redundant CustomTabsToolbarFeature

This commit is contained in:
Emily Kager 2019-03-15 15:10:13 -07:00 committed by Colin Lee
parent 8cfdae7973
commit 56f4174c02
1 changed files with 1 additions and 12 deletions

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
}
}