For #11935 - Move BrowserThumbnails to BrowserFragment.
parent
e42a8f5fa2
commit
2bdcbe5db9
|
@ -42,7 +42,6 @@ import mozilla.components.browser.state.selector.findTabOrCustomTabOrSelectedTab
|
|||
import mozilla.components.browser.state.state.SessionState
|
||||
import mozilla.components.browser.state.state.content.DownloadState
|
||||
import mozilla.components.browser.state.store.BrowserStore
|
||||
import mozilla.components.browser.thumbnails.BrowserThumbnails
|
||||
import mozilla.components.concept.engine.prompt.ShareData
|
||||
import mozilla.components.feature.accounts.FxaCapability
|
||||
import mozilla.components.feature.accounts.FxaWebChannelFeature
|
||||
|
@ -140,7 +139,6 @@ abstract class BaseBrowserFragment : Fragment(), UserInteractionHandler, Session
|
|||
private val appLinksFeature = ViewBoundFeatureWrapper<AppLinksFeature>()
|
||||
private val promptsFeature = ViewBoundFeatureWrapper<PromptFeature>()
|
||||
private val findInPageIntegration = ViewBoundFeatureWrapper<FindInPageIntegration>()
|
||||
private val thumbnailsFeature = ViewBoundFeatureWrapper<BrowserThumbnails>()
|
||||
private val toolbarIntegration = ViewBoundFeatureWrapper<ToolbarIntegration>()
|
||||
private val sitePermissionsFeature = ViewBoundFeatureWrapper<SitePermissionsFeature>()
|
||||
private val fullScreenFeature = ViewBoundFeatureWrapper<FullScreenFeature>()
|
||||
|
@ -281,12 +279,6 @@ abstract class BaseBrowserFragment : Fragment(), UserInteractionHandler, Session
|
|||
lifecycleOwner = viewLifecycleOwner
|
||||
)
|
||||
|
||||
thumbnailsFeature.set(
|
||||
feature = BrowserThumbnails(context, view.engineView, store),
|
||||
owner = this,
|
||||
view = view
|
||||
)
|
||||
|
||||
toolbarIntegration.set(
|
||||
feature = browserToolbarView.toolbarIntegration,
|
||||
owner = this,
|
||||
|
|
|
@ -21,6 +21,7 @@ import kotlinx.android.synthetic.main.fragment_browser.view.*
|
|||
import kotlinx.coroutines.ExperimentalCoroutinesApi
|
||||
import mozilla.components.browser.session.Session
|
||||
import mozilla.components.browser.state.selector.findTab
|
||||
import mozilla.components.browser.thumbnails.BrowserThumbnails
|
||||
import mozilla.components.browser.toolbar.BrowserToolbar
|
||||
import mozilla.components.feature.app.links.AppLinksUseCases
|
||||
import mozilla.components.feature.contextmenu.ContextMenuCandidate
|
||||
|
@ -55,6 +56,7 @@ class BrowserFragment : BaseBrowserFragment(), UserInteractionHandler {
|
|||
|
||||
private val windowFeature = ViewBoundFeatureWrapper<WindowFeature>()
|
||||
private val searchFeature = ViewBoundFeatureWrapper<SearchFeature>()
|
||||
private val thumbnailsFeature = ViewBoundFeatureWrapper<BrowserThumbnails>()
|
||||
|
||||
private var readerModeAvailable = false
|
||||
|
||||
|
@ -107,6 +109,12 @@ class BrowserFragment : BaseBrowserFragment(), UserInteractionHandler {
|
|||
|
||||
browserToolbarView.view.addPageAction(readerModeAction)
|
||||
|
||||
thumbnailsFeature.set(
|
||||
feature = BrowserThumbnails(context, view.engineView, components.core.store),
|
||||
owner = this,
|
||||
view = view
|
||||
)
|
||||
|
||||
readerViewFeature.set(
|
||||
feature = StrictMode.allowThreadDiskReads().resetPoliciesAfter {
|
||||
ReaderViewFeature(
|
||||
|
|
Loading…
Reference in New Issue