Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removing a like should remove the alert #33

Closed
andrewjs18 opened this issue Aug 8, 2018 · 5 comments
Closed

removing a like should remove the alert #33

andrewjs18 opened this issue Aug 8, 2018 · 5 comments

Comments

@andrewjs18
Copy link

not doing so leads to confusion as the alert is no longer valid. the thank you/like plugin does this.

@chack1172
Copy link
Contributor

Isn't it already deleting alerts when unlike?
https://github.com/MyBBStuff/SimpleLikes/blob/master/inc/plugins/simplelikes.php#L875

@chack1172
Copy link
Contributor

Ok. I found what are the problems. First in the query that I sent in the past comment we should use from_user_id and not uid. The second problem is that the function deleteAlerts of MyAlerts tries to delete the alerts he received but it checks if the alerts belongs to who unliked the message. So we can't use that method.

@andrewjs18
Copy link
Author

this did not appear to fix the issue for me. here's the issue I'm seeing:

when you click something to like it, it works as expected. when you unlike something, it doesn't automatically switch from 'like' to 'unlike' like it did previously - you have to physically reload the page to see that the status has changed. furthermore, it does not remove the like notification from your alert window if you unlike something.

@chack1172
Copy link
Contributor

I sent a new commit to fix it. I didn't test the second commit yesterday, sorry.

@andrewjs18
Copy link
Author

fixed now. if someone removes a like, refresh the page and the like is removed from the alerts window.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants