Solved Issue #238 : Favorite Button #258
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The toggle feature is added to favorite button.
On toggling the card is either added or removed from the Favorites page.
Output :
As shown is the above Screenshot, Phone 2 is liked, hence it's in Favorite page, and since Phone 1 is not liked, it's not showing in Favorites page.
NOTE : fetch and use realtime user data instead of dummy data to keep the changes saved! (As mentioned in HomeScreenViewModel.kt) As, I have tried the code on temporary demo data, since I wasn't able to access realtime data.
Also, i wasn't able to signIn via gmail or Google, is there a issue with that?