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/4412: Only consume state change when UI initialized

This commit is contained in:
Christian Sadilek 2019-08-01 11:10:13 -04:00
parent 4e2c157646
commit 9b0b917db5

View File

@ -227,6 +227,27 @@ class BrowserFragment : Fragment(), BackHandler {
browserToolbarView.view.setOnSiteSecurityClickedListener {
showQuickSettingsDialog()
}
customTabSessionId?.let { customTabSessionId ->
customTabsIntegration.set(
feature = CustomTabsIntegration(
requireContext(),
requireComponents.core.sessionManager,
toolbar,
customTabSessionId,
activity,
view.nestedScrollQuickAction,
view.swipeRefresh,
onItemTapped = { browserInteractor.onBrowserToolbarMenuItemTapped(it) }
),
owner = this,
view = view)
}
consumeFrom(browserStore) {
quickActionSheetView.update(it)
browserToolbarView.update(it)
}
}
contextMenuFeature.set(
@ -404,27 +425,6 @@ class BrowserFragment : Fragment(), BackHandler {
owner = this,
view = view
)
customTabSessionId?.let {
customTabsIntegration.set(
feature = CustomTabsIntegration(
requireContext(),
requireComponents.core.sessionManager,
toolbar,
it,
activity,
view.nestedScrollQuickAction,
view.swipeRefresh,
onItemTapped = { browserInteractor.onBrowserToolbarMenuItemTapped(it) }
),
owner = this,
view = view)
}
consumeFrom(browserStore) {
quickActionSheetView.update(it)
browserToolbarView.update(it)
}
}
private fun themeReaderViewControlsForPrivateMode(view: View) = with(view) {