[fenix] Bug 1812580 - Wait for the layout cycle to complete before changing anchors
commitd67175f6ec696f6020c1fa97ddf823b60b93c651
authorMugurell <Mugurell@users.noreply.github.com>
Tue, 31 Jan 2023 11:37:47 +0000 (31 13:37 +0200)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Wed, 1 Feb 2023 17:38:21 +0000 (1 17:38 +0000)
tree4f7bf12db175524e5a9bdca27726235e9fb1337b
parent8ce3181a358912956b6f0bed61362e2b63053340
[fenix] Bug 1812580 - Wait for the layout cycle to complete before changing anchors

This comes to solve the issue seen in the error logs by adding the anchor
change done for the snackbar to the operation queue on thread Main thread.
Should allow to avoid chaning the snackbar's anchor in between onMeasure and
onLayout.
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/FenixSnackbarBehavior.kt
mobile/android/fenix/app/src/test/java/org/mozilla/fenix/components/FenixSnackbarBehaviorTest.kt