Gravatar-SDK-Android icon indicating copy to clipboard operation
Gravatar-SDK-Android copied to clipboard

Launch showSnackbar from a separate coroutineScope to not block collect()

Open AdamGrzybkowski opened this issue 1 year ago • 1 comments

Closes #365

Description

We used the scope from the collect function to show the snack bar. showSnackbar suspends until the snackbar disappears so we were blocking new events from being collected and this caused the bug where the onAvatarSelected would be invoked with a delay.

Testing Steps

Select multiple avatars while the snackbar is visible. The Avatar in the demo app should be refreshed without waiting for the snack to disappear.

AdamGrzybkowski avatar Oct 11 '24 11:10 AdamGrzybkowski

📲 You can test the changes from this Pull Request in Gravatar Demo by scanning the QR code below to install the corresponding build.
App Name Gravatar Demo
Commit9bd5c8a6adbc0e19ed2bcdc395fe14fd95b6afde
Direct Downloadgravatar-demo-prototype-build-pr386-9bd5c8a.apk

wpmobilebot avatar Oct 11 '24 11:10 wpmobilebot