Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Commit

Permalink
For #11841: Removed topsite bug on private browsing (#12020)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcLeclair authored Jun 26, 2020
1 parent 005ad6f commit f3b44c0
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -248,11 +248,17 @@ class HomeFragment : Fragment() {
* 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.
*/
fun updateSessionControlView(view: View) {
sessionControlView?.update(homeFragmentStore.state)
private fun updateSessionControlView(view: View) {
if (browsingModeManager.mode == BrowsingMode.Private) {
view.consumeFrom(homeFragmentStore, viewLifecycleOwner) {
sessionControlView?.update(it)
}
} else {
sessionControlView?.update(homeFragmentStore.state)

view.consumeFrom(homeFragmentStore, viewLifecycleOwner) {
sessionControlView?.update(it)
view.consumeFrom(homeFragmentStore, viewLifecycleOwner) {
sessionControlView?.update(it)
}
}
}

Expand Down

0 comments on commit f3b44c0

Please sign in to comment.