Loopcast / beta

1 stars 0 forks source link

If i'm the first one to like a tape i can like it twice #743

Closed hems closed 7 years ago

hems commented 8 years ago

Because the heart just bellow the set don't change when i clicked the big heart on the right side

thomas1602 commented 8 years ago

@stefanoortisi another issue I realised; When I unlike a set and relike, the activity in the comment list shows a new like. This should only be shown once per user

screen shot 2016-01-12 at 17 55 32

stefanoortisi commented 8 years ago

The issue of having two or more "liked this session", I think, should be managed by the backend, as the frontend still needs to send the action of like/unlike even more than once, while the backend should update the counter but retrieving the message of "liked this session" just the first time. Am I right @hems? what do you think?

hems commented 8 years ago

@stefanoortisi indeed the backend should block, but if i like the set from the player the heart just below the set on the top of the page doesn't change, so the user can go there and press like again.

the backend won't actually count it twice!

stefanoortisi commented 8 years ago

If the heart below the set doesn't change, then it's another issue. This one I'm talking about happens when you press like, then you press unlike, and press like again. The counter will count the right number but the message "User liked the room" will be shown two times. So the problem I'm talking about is the problem mentioned by Thomas. I will try to fix the problem you mentioned, anyway.

stefanoortisi commented 8 years ago

Ok, i will create another issue for the problem mentioned by Thomas.

For the problem you talked about, I probably found something:

It looks like I'm not receiving any callback event from the socket the tape view is subscribed to. I'm not getting any like event neither any message event. I currently need to refresh to see the actual changes on the page.

This is the line where I subscribe to the socket: https://github.com/Loopcast/beta/blob/staging/src/frontend/scripts/views/room/tape_view.coffee#L53

And this is the line where i should get the callback https://github.com/Loopcast/beta/blob/staging/src/frontend/scripts/views/room/tape_view.coffee#L56

Do you have any idea what this is happening? am i listening the right channel?