I am trying to create a screen in my app to show the users that have read a comment. So, it would be rather like FB messenger which shows it has been read and you can then list icons of each user as each user reads it.
The principle appears simple, an inline list showing a relation as each comment fills with users that have read it. But this is where I am stuck
How do I record when a user has “seen” a comment? There seems to be no obvious way of tracking and recording this data.
Being new, naturally, I was looking for a tool that maybe is “hidden” that records a “view” event. When that event = true, then the user identifier (in my case their email) is recorded in the COMMENTS table. The relation simply sees these emails against the comment to “know” it is read.
Also, if you’re not too worried about knowing who’s read the “comment” but you just want a user to know which they’ve personally read, then a simple User Specific boolean column would suffice. This would allow you to show a user all comments that they have yet to read, for example.
Thanks @V88 this has done the trick as it stops the email from being recorded mutlitple times. IT is a true or false for that user as they only need to see it once to have been “read” I dont need to see how many times they have read.
Saying the list is email@example.com, firstname.lastname@example.org then if email@example.com is viewing the comment, it falls into the last scenario and returns the same list, so you’re essentially writing the same value to the column.