zulip-terminal
zulip-terminal copied to clipboard
Wrong rendering of reaction removal if multiple already present
- 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 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.
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 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 I have a WIP branch for this which improves some tests as well. I'll work on digging it out.