2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-11 13:11:01 +00:00
This commit is contained in:
MarcLeclair 2020-06-26 14:54:20 -04:00 committed by GitHub
parent 60ea328837
commit fe4a508fbf

View File

@ -248,11 +248,17 @@ class HomeFragment : Fragment() {
* data in our store. The [View.consumeFrom] coroutine dispatch * data in our store. The [View.consumeFrom] coroutine dispatch
* doesn't get run right away which means that we won't draw on the first layout pass. * doesn't get run right away which means that we won't draw on the first layout pass.
*/ */
fun updateSessionControlView(view: View) { private fun updateSessionControlView(view: View) {
sessionControlView?.update(homeFragmentStore.state) if (browsingModeManager.mode == BrowsingMode.Private) {
view.consumeFrom(homeFragmentStore, viewLifecycleOwner) {
sessionControlView?.update(it)
}
} else {
sessionControlView?.update(homeFragmentStore.state)
view.consumeFrom(homeFragmentStore, viewLifecycleOwner) { view.consumeFrom(homeFragmentStore, viewLifecycleOwner) {
sessionControlView?.update(it) sessionControlView?.update(it)
}
} }
} }