This will help avoid a race between the two layers of the svg, with previously
only changing the color for just one.
By applying the new theme to the button when needing to apply the textColor
from wallpaper it will automatically use the right
(cherry picked from commit c7c5682104)
Co-authored-by: Mugurell <Mugurell@users.noreply.github.com>
* For #26644 - Split the Fenix logo in two images
This will allow us applying a certain tint just for the image containing a text
to have a better contrast with wallpapers.
(cherry picked from commit 103a0cb250)
* For #26644 - Apply the wallpaper provided text color to the Fenix logo
And to the private mode switcher.
(cherry picked from commit 7b5ba840ab)
Co-authored-by: Mugurell <Mugurell@users.noreply.github.com>
This will help avoid a race between the two layers of the svg, with previously
only changing the color for just one.
By applying the new theme to the button when needing to apply the textColor
from wallpaper it will automatically use the right
Split loading the bitmap from storage and actually setting it in two operations
with one that can run in parallel with onCreateView for HomeFragment and one
that can be used serially on the main thread to actually set the wallpaper.
This seems like the best compromise to ensure that everytime the homescreen is
shown it will have the wallpaper set but does affect the performance - there is
a delay in showing HomeFragment to account for waiting for the wallpaper to be
set.
In testing the new delay seems close to the one from the initial wallpapers
implementation. See more in https://github.com/mozilla-mobile/fenix/pull/26794.
As part of a preventitive measure for home page regression loading, we
fixed the UpdateFirstFrameDrawn call to happen after the first layout in
the main RecyclerView is completed. In addition, we also make pocket
aware of this flag so that it renders itself after the first layout.
This helps prioritize current & future features that are visible first
to render before those that are off screen.
Co-authored-by: Arturo Mejia <arturomejiamarmol@gmail.com>
By using Store.observeManually in a standalone coroutine we can observe the
store and update the wallpapers even before onStart (in manual tests is right
around onStart, certainly before the other widgets shown on homescreen).
Created a new WallpapersObserver to have the functionality easier to reason
about and be easier to test.
PocketStoriesChange was called only once - to clean the shown stories when the
user gets to the homescreen and the Pocket feature is disabled - useful for the
situations in which the user returns after disabling the feature in settings.
Populating the store with recommended stories to show was already happening
based on 'PocketStoriesCategoriesChange' and sponsored stories will be added by
using 'PocketSponsoredStoriesChange' so renaming 'PocketStoriesChange' will
help on reducing any confusion in the future.
Also added documentation for all Pocket related actions from AppStore and
removed the 'UndocumentedPublicClass' detekt suppressions.