I'm developing an app with different topics where users can leave comments. To prevent spam, I want to restrict users to only one comment per topic.
Currently, I have a ListView with firebase query collection 'Comments' filtered by 'topics'. The user can create a new document within the collection 'Comments' by pressing the button in the lower right corner.
My take on it to restrict the user from adding more comments is to use conditional visibility on the + button.
show 'if Commentcollection exists 'and' userref=authenticated user'
This doesn't work because the button is outside the listview query. Using also a 'Comments' query on the button is preventing the page to load properly.
How can I achieve this functionality effectively?
Thanks so much