[fenix] For https://github.com/mozilla-mobile/fenix/issues/11660: added prefetch...
commit48d9cc13a3406637aa709e59d11f1931a54b43be
authorMarcLeclair <marc.leclair0113@gmail.com>
Thu, 18 Jun 2020 23:43:20 +0000 (18 19:43 -0400)
committerGitHub <noreply@github.com>
Thu, 18 Jun 2020 23:43:20 +0000 (18 19:43 -0400)
tree6a626b24052f638b383779db21f70f875debef96
parent9d13ea6f97ebf8961d0b9c1450c95746903ef6d2
[fenix] For https://github.com/mozilla-mobile/fenix/issues/11660: added prefetch for topsites and update in onCreateView() (https://github.com/mozilla-mobile/fenix/pull/11668)

* For https://github.com/mozilla-mobile/fenix/issues/11660:added prefetch for topsites

TopSites will be prefetched with observerOnce (wrapper around observerForever).
Also, the SessionControlView.update() is called right away instead of waiting from consumeFrom
in the HomeFragment.onCreateView() which will allow the UI to render all at once on its first
perform traversal

* Removed the submitList(null) since it retriggered a drawing on lower end device
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/FenixApplication.kt
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/TopSiteStorage.kt
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/ext/LiveData.kt [new file with mode: 0644]
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/SessionControlView.kt