Gravatar-SDK-Android
Gravatar-SDK-Android copied to clipboard
Launch showSnackbar from a separate coroutineScope to not block collect()
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.
📲 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 | |
| Commit | 9bd5c8a6adbc0e19ed2bcdc395fe14fd95b6afde | |
| Direct Download | gravatar-demo-prototype-build-pr386-9bd5c8a.apk |