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