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

Liking messages in party chat doesn't always update like count as expected #2051

Closed
jsoberg opened this issue Dec 17, 2023 · 0 comments
Closed
Assignees

Comments

@jsoberg
Copy link
Contributor

jsoberg commented Dec 17, 2023

Describe the bug
I was fixing the issue in #1861 and noticed that while the click callback was being called and we were contacting server to update the message likes, the like count does not always react to these changes in the list. I'm separating this out into its own bug report since it doesn't involve the touch target issue from #1861.

To Reproduce
Steps to reproduce the behavior:

  1. Open a party chat.
  2. Like or unlike someone else's message.
  3. Repeat until like count does not update as expected.

Expected behavior
The like count should update each time that you like and unlike the message.

Screenshots
(clicking on an emulator often through this recording, some updates show and some don't).
studio64_6nvwlvRCZf

Smartphone (please complete the following information):

  • Device: Pixel 7 emulator
  • OS: API 33
  • App Version: develop, cc5cd88
  • Habitica Username: jsoberg

Additional context

There appear to be a few issues here that I can see at an initial glance:

  1. SocialRepositoryImpl.likeMessage always returns null, and therefore we never submit an update for that message in GroupViewModel.likeMessage.
  2. RealmSocialLocalRepository.likeMessage doesn't update when the message is already liked, so when we go from liked to unliked we don't make any local changes.

After addressing these issues locally and doing a little debugging, it seems like the message returned from apiClient.likeMessage still ends up not being changed on some calls, so I'm wondering if this could also potentially be an issue on the server and/or an issue with submitting the change within a certain time interval and being ignored.

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