Skip to content

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.

3 participants