Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling show() consecutively #28

Closed
tingyik90 opened this issue Dec 19, 2019 · 1 comment
Closed

Calling show() consecutively #28

tingyik90 opened this issue Dec 19, 2019 · 1 comment

Comments

@tingyik90
Copy link
Owner

Apart from #26, when calling show() consecutively without dismiss(), e.g. showing "Updating database..." and if the result immediately returned to show "Database updated!", due to the way SnackbarManager works, it can trigger the callback differently than expected. Typically the call will be:

snackProgressBar1.show() 
snackProgressBar2.show()
snackProgressBar1.onDismissed()     // Due to snackProgressBar1 immediately dismissed before showing
snackProgressBar1.onShown()
snackProgressBar2.onShown()

This can mess up user operation if there are operations pending in the callback.

@tingyik90
Copy link
Owner Author

b4f3f98 makes sure that BaseCallback.onShown() is called first i.e. snackProgressBar1 has finished appear animation before showing the next in queue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant