I am trying to create a news app with mit app inventor on which only the owner can post the news and it stores the news in firebase database for all users to see it and below that I am adding a like, dislike section but every user is able to like or dislike multiple times. But I want a single user to vote a single time either on like or dislike. I am also using an extension for the user to sign in with his/her google account so I thought I can solve it with the google account like by fetching the user email and checking if this user has already voted or not but i am not able to implement this. please help
Here's what you could do: you could disable the buttons once you like or dislike; however, you won't be able to unlike the post. Instead, you could do this:
Add 2 invisible buttons: Unlike, and un-dislike (not really a word, but I guess it should do )
So, whenever you click on the like button, it will be hidden, the dislike button can be disabled, and, the unlike button will appear.
If the dislike button is pressed, you can hide it, the like button can be disabled, and the un-dislike button can be shown instead.
Here's how the code will look: