ux: bug fix: save private draft when clearing and pasting same value
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$
:
- start with message
foo
->compose$
isfoo
, passes filter and dropRepeats so emitsfoo
, eventually save draft - cut
foo
->compose$
is '', doesn't pass filter so does not emit - paste
foo
->compose$
isfoo
, passes filter but does not passdropRepeats
because the previously emitted value is thefoo
from (1), so draft is not saved.
Edited by Andrew Chou