Description
Quoting from #410 (comment) :
Oh, I've noticed a subtle bug in the model code. When you have two message lists open, and a new-message event arrives, we add the same
Message
object to both message lists (if it belongs in both), instead of adding copies. This means that reaction events are double-processed on a singleMessage
object. (Processed once for each message list, on the sameMessage
instance.)Here's a recipe for reproducing one symptom:
- On your account, enable "Display names of reacting users when few users have reacted to a message."
Check out this PR[unnecessary;#410
was merged] and log into your account in zulip-flutter.- Open "All messages".
- Open a topic narrow by tapping a recipient header.
- Send a message in that topic.
- In the web app, add a reaction on the message. (Any reaction, from any user).
- In zulip-flutter, see the name of the reacting user (or "You") appears, as expected.
- Repeat step 6, but with a different reaction or user.
- This time, in zulip-flutter, the reacting user's name is not shown; it just shows numbers. This would be expected if there were three or more reactions on the message, but in this case there are just two.
In step 9, the
[Reactions.total]
is 4 instead of 2 because of the double-processing.
Greg replied there:
Interesting, yeah.
I think we can let that bug not block merging this [#410], and handle it later. The fix will probably involve having a central map of messages, akin to state.messages in zulip-mobile.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status