Add to list icon

Hello.
I’ve created a heart icon that every time it’s clicked will add the movie content into the user’s list.
It was working 2 days ago but it stopped working.
How can I fix this?






@boston85719
Thank you so much!

@joana

Perhaps it may come handy to familiarize yourself with the debugger tool. If there is one constant in app building is that fixes/improvements are a never-ending effort :sweat_smile:

It may be worth your while: :grinning:

1 Like

Thank you so much for the tip. I’ve already checked the debugger but I cannot find any problems with the process. It’s so strange.

@joana

Took a closer look. Try this:

  • We are going to build logic where the heart icon is the only element being clicked. Currently there are two diff elements adding/removing the movie from “my list”.
  • We are also going to add two conditions to the heart icon so that when one is true the icon will be red. And if the second is false then the icon color should be empty or gray or … any color to suit your app but not red!

Action flows:

  1. When heart icon is clicked … and only when my list doesn’t contain parent group movie content … make changes to current user … mylist add parent groups movie content
  2. When heart icon is clicked … and only when my list contains parent group movie content … make changes to current user … mylist remove parent groups movie content

Heart icon conditions

  1. When parent group movie content is empty … background color is gray
  2. When parent group movie content is not empty … background color is red

This should do the trick :grinning:

Hello!
I’ve done exactly as you suggested and it still didn’t work (the colours didn’t change this time and the movie was not added to my list). Then I’ve made a few changes that I thought would work but still nothing. :frowning:

Here are all the things I’ve done:







Thank you so much!
@boston85719

The color conditions do not go in actions they go in the element

@joana

An element conditions tab is found on the second tab in its properties box:

Yes yes. The colours I’ve added on the action was just to organize myself. I added the colours on the conditions of the element as well as you can see here:

1 Like

Okay! Now it worked perfectly. I just needed to change a few things.
Here is the solution:





Thank you so much!!

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.