Skip to content

ux: bug fix: save private draft when clearing and pasting same value

Andrew Chou requested to merge 2106/private-chat-draft into master

Addresses #2106 (closed)

Fix is to drop repeats of the message text before filtering events where message text is present. The original issue can be highlighted with this example based on saveDrafts$:

  1. start with message foo -> compose$ is foo, passes filter and dropRepeats so emits foo, eventually save draft
  2. cut foo -> compose$ is '', doesn't pass filter so does not emit
  3. paste foo -> compose$ is foo, passes filter but does not pass dropRepeats because the previously emitted value is the foo from (1), so draft is not saved.
Edited by Andrew Chou

Merge request reports