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

[fenix] For https://github.com/mozilla-mobile/fenix/issues/4921 - Adds WindowFeature to BaseBrowserFragment

This commit is contained in:
Emily Kager 2019-08-27 11:24:46 -07:00 committed by Emily Kager
parent eb53d10047
commit 018086c9ae
2 changed files with 9 additions and 1 deletions

View File

@ -41,6 +41,7 @@ import mozilla.components.feature.session.FullScreenFeature
import mozilla.components.feature.session.SessionFeature
import mozilla.components.feature.session.SessionUseCases
import mozilla.components.feature.session.SwipeRefreshFeature
import mozilla.components.feature.session.WindowFeature
import mozilla.components.feature.sitepermissions.SitePermissions
import mozilla.components.feature.sitepermissions.SitePermissionsFeature
import mozilla.components.feature.sitepermissions.SitePermissionsRules
@ -85,6 +86,7 @@ abstract class BaseBrowserFragment : Fragment(), BackHandler, SessionManager.Obs
protected lateinit var browserToolbarView: BrowserToolbarView
private val sessionFeature = ViewBoundFeatureWrapper<SessionFeature>()
private val windowFeature = ViewBoundFeatureWrapper<WindowFeature>()
private val contextMenuFeature = ViewBoundFeatureWrapper<ContextMenuFeature>()
private val downloadsFeature = ViewBoundFeatureWrapper<DownloadsFeature>()
private val appLinksFeature = ViewBoundFeatureWrapper<AppLinksFeature>()
@ -224,6 +226,12 @@ abstract class BaseBrowserFragment : Fragment(), BackHandler, SessionManager.Obs
view = view
)
windowFeature.set(
feature = WindowFeature(requireComponents.core.sessionManager),
owner = this,
view = view
)
downloadsFeature.set(
feature = DownloadsFeature(
requireContext().applicationContext,

View File

@ -40,7 +40,7 @@ import org.mozilla.fenix.ext.requireComponents
import org.mozilla.fenix.library.LibraryPageFragment
import org.mozilla.fenix.share.ShareTab
@SuppressWarnings("TooManyFunctions")
@SuppressWarnings("TooManyFunctions", "LargeClass")
class HistoryFragment : LibraryPageFragment<HistoryItem>(), BackHandler {
private lateinit var historyStore: HistoryStore
private lateinit var historyView: HistoryView