zulip-terminal icon indicating copy to clipboard operation
zulip-terminal copied to clipboard

Wrong rendering of reaction removal if multiple already present

Open neiljp opened this issue 5 years ago • 4 comments

  • Find a message with multiple thumbs-up
  • Toggle thumbs-up (+)
  • Toggle again

One of those last two, depending on your previous thumbs-up reaction to that message, currently completely removes that reaction from being rendered - and would probably do the same for other reactions when we add that feature in future.

neiljp avatar Apr 20 '20 10:04 neiljp

@neiljp I can reproduce this but not all the time. Sometimes it leads to different behaviour This is what happens:

  • Find a message with multiple thumbs-up
  • Toggle thumbs-up (+)
  • Toggle again to remove thumbs-up
  • Previous thumbs-ups remain, but now I cannot add my thumbs up again.

kaustubh-nair avatar Apr 21 '20 07:04 kaustubh-nair

I suspect that the reason is the following code block in model.py. There are two key issues here:

  • it removes all the reactions (we could warrant a break),
  • it removes whichever reaction it finds first (the comment has an explanation).

https://github.com/zulip/zulip-terminal/blob/7bc9da6c7d762f93554b26abb434f6a65ce68f79/zulipterminal/model.py#L840-L844

preetmishra avatar Jun 13 '20 05:06 preetmishra

@preetmishra Are you planning to push the changes in your local commit ?

I guess it would be good to merge this before #913. so as to avoid provoking the removal issue in the EmojiPicker?

Ezio-Sarthak avatar Feb 15 '21 05:02 Ezio-Sarthak

@Ezio-Sarthak I have a WIP branch for this which improves some tests as well. I'll work on digging it out.

neiljp avatar Feb 15 '21 07:02 neiljp