Skip to content

Conversation

@PVince81
Copy link
Member

Description

Save the message from the current input field by conversation into the
store.

This makes it possible to keep the message when switching the
conversation.

Also fixes an issue where joining or leaving a call would clear the
message due to the field being destroyed and recreated between the
message list and the sidebar.

Related issue

Fixes #5372

Notes

Cursor position

There's a small issue: when the field is populated, the cursor appears at the beginning.
Given how complicated it is to set the cursor at the end we might want to pass on that one, considering that we'll also replace the field with a better version of it in #4333

Store module name

The store module is still called "quoteReplyStore", we could rename to "currentMessageStore" or something similar. Not sure if it's the right time now.

Tests

  • TEST: switching to read-only channel like changelog doesn't log errors and the field stays empty
  • TEST: switch to conversation A, type text "abc", switch to B, type text "def", switch back to A => the field shows "abc"
  • TEST: type text "abc", start call => message stays in sidebar field
  • TEST: start call, type text "abc", leave call => message stays in message list field
  • TEST: quoted reply is also kept between conversation switch and starting/leaving a call
  • TEST: emojis also kept

Save the message from the current input field by conversation into the
store.

This makes it possible to keep the message when switching the
conversation.

Also fixes an issue where joining or leaving a call would clear the
message due to the field being destroyed and recreated between the
message list and the sidebar.

Signed-off-by: Vincent Petry <[email protected]>
@PVince81 PVince81 merged commit 7f8821b into master Mar 19, 2021
@PVince81 PVince81 deleted the bugfix/5372/store-current-message-per-token branch March 19, 2021 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Not sent message gets lost if call is ended

3 participants