Favorite button problem

When you press the Favorites button, the Url will be added to the Favorites list
And the problem is how can I when I press again it is removed from the list and when the title is there, the button remains red

This blocks Screen1

This blocks Screen2

Upon pressing favourite button, as you did just check.

If the current url is not in the tinydb list,
Then Add items to the list and save the list in tinydb+ change the button colour to red
Else remove the item from the list using index method + change the button colour

Sorry, I’m not good at English and I can’t understand your words, could you explain to me the blocks?

1 Like

Thank you for this, but there is a problem, which is when you visit an URL that is saved in your favourites, the button must automatically turn red to recognize that it is saved in your favourites.

I hope you understand me :grinning:

try like this or that

I believe the above will not work after reading all of suggested blocks. So, Try like this and check up

Like this: :point_down: :point_down:

Unfortunately, this method did not work​:slightly_frowning_face:

It mean , your blocks is not in my suggested manner i think. You can debug your blocks on every steps to confirm it

I used the ib instead of the Url because I’m putting the custom web view component

It mean?? Can you show your block?


I am using CustomWebView

Did you debug here each if block? Favourite button? To cross check

Can you show me the blocks of how did you add items in favourite list ?

You can see the aia file
Favorite.aia (210.3 KB)

Sorry for the delay, I had some problems

pls read this guide

you have not added this block

image

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.