Fix occasionally sending duplicate messages#871
Fix occasionally sending duplicate messages#871RxmTaco wants to merge 1 commit intocommetchat:mainfrom
Conversation
|
I can confirm testing this with @RxmTaco patch. Previously messages would be sent twice seemingly randomly, but it had to do with sending too quickly after typing. With the patch this couldn't be reproduced anymore. +1 from me |
|
i believe this was already fixed in #838, which would explain why you couldn't reproduce it. this change might not be necessary |
This is probably not yet in the latest flatpak? |
that's correct |
Oops, didn't see that one! Still I would think using the |
This patch fixes #868 by replacing enter key handling in
message_input.dartto only happen duringKeyDownEventinstead of the globalisLogicalKeyPressedstate.In
chat.dartthe state for theprocessingflag insendMessagewas already being set, but was not used to guard the operation by checking it's state before processing a new message. This has been changed to return early if a previous message is still being processed while a newsendMessagegets requested.I was not able to reproduce the error myself and thus wasn't able to verify that the patch works as intended.
However @Katacc originally let me know of the problem and also was able to test and verify that the patch works.