Skip to content
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.

listen animation state #97

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

mengxn
Copy link

@mengxn mengxn commented May 29, 2020

listen animation state

@facebook-github-bot
Copy link

Hi @mengxn!

Thank you for your pull request and welcome to our community.We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file.

In order for us to review and merge your code, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

if (mValueAnimator != null && !isShimmerStarted() && getCallback() != null) {
if (listener != null) {
mValueAnimator.addListener(listener);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're adding a listener here but never removing it, you should also removeAllListeners on line 171

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also should be removed in stopShimmer, otherwise starting and stopping will constantly accumulate new listeners

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

Successfully merging this pull request may close these issues.

4 participants