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

Fix _handleIsLikeChanged which stops animations when a remote initial value of isLiked is provided to LikeButton #77

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

Conversation

azy99
Copy link

@azy99 azy99 commented Jan 29, 2023

Fix _handleIsLikeChanged which stops animations when a remote initial value (eg: from Firestore) of isLiked is provided to LikeButton. The comparison isLiked != _isLiked is unnecessary

@zmtzawqlp
Copy link
Member

any runnable demo? i also use hive to cache the value, but i didn't meet your problem

@azy99
Copy link
Author

azy99 commented Jan 31, 2023

I do not have a runnable demo because it is a private project. What I had in the project is a list of cards from a stream. The cards have buttons. The value of the button is saved in firestore.
But anyways what exactly is the purpose of comparing isLiked to _isLiked?

@zmtzawqlp
Copy link
Member

I do not have a runnable demo because it is a private project. What I had in the project is a list of cards from a stream. The cards have buttons. The value of the button is saved in firestore. But anyways what exactly is the purpose of comparing isLiked to _isLiked?

why need to setstate if it is not changed? i can't find the result with more info about it.

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

Successfully merging this pull request may close these issues.

None yet

3 participants