2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-03 23:15:31 +00:00

For #4412: Only consume state change when UI initialized

This commit is contained in:
Christian Sadilek 2019-08-01 11:10:13 -04:00
parent f815ef1dd0
commit 9887945296

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) {