In my app, the user can add an item to their Favorite list by pressing a checkbox.
A new node (Favorites) is created in the database for each user. Just like this:-
Firebase Structure
User can view their favorite list under "Favorites" activity. Like this:- Favorites Activity
The "Home Activity" displays all the hacks from the "Hacks" list.
My question is how to combine the "Hacks" and the "Favorites" list for a particular user so that the user can see his/her favorite item highlighted (like button being active ie red in color) in the Home Activity. What logic or any firebase technique should I use? User should be able to see his/her item highlighted in the Home Activity and also can add or remove an item from their favorites list by clicking on the like button from both Favorites and Home Activity.