I was trying to display a list in list viewer by using Firebase DB. Unfortunately, if I open the screen in which that list viewer is in(Read Recommendations), it duplicates the same values each time I open the screen.
I tried clearing the list viewer before adding the list items, but no luck there!
Here is the code:
Please note that the value in variable ‘Book_List’ are being saved in another variable called ‘Books_List’.
I have also attached the screenshot of the code in the screen where I enter the list items as well below:
I had read all the other community discussions similar to this but there is a slight difference: Since this is an app which can be accessed by every user, there are scenarios where the user will be giving the same values as another user had given. I do not want to clear these values. I only want to clear the values which the bug in my code has duplicated.
Thanks in Advance,