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

Request: More reliable speed dial animation handling #44

Open
sronbheannach opened this issue Nov 1, 2018 · 1 comment
Open

Request: More reliable speed dial animation handling #44

sronbheannach opened this issue Nov 1, 2018 · 1 comment
Labels

Comments

@sronbheannach
Copy link

I’ve run into a bug in our app where, due to how our app is structured and how we handle configuration changes, we can run into a race condition where when we get to animateSpeedDialMenuItems() In FloatingActionButton.kt when trying to close the menu after clearing out speedDialMenuViews (basically, the source of our menu items gets destroyed before we can close the menu). This means speedDialMenuViews.forEachInexed() iterates over no items and busyAnimatingSpeedDialMenuItems is never set to false. When this happens the menu won’t open again.

If you changed line 575 (on master as of today) from

busyAnimatingSpeedDialMenuItems = true

to

busyAnimatingSpeedDialMenuItems = speedDialMenuViews.count() != 0

that would prevent situations where busyAnimatingSpeedDialMenuItems gets stuck when you don’t have any items.

@markormesher
Copy link
Owner

Hey @sronbheannach, thanks for the feedback. I don't have a ton of time to give to this project at the moment, but if you want to PR that improvement I'd be happy to review and cut a release. If not, I'll be able to pick this up in a week or two. If you do decide to PR it, it'd be good to see something a little more verbose about why the count is checked.

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

No branches or pull requests

2 participants