Closed noumantahir closed 3 years ago
Initial debugging reveal two issues with editorConainer, one may be an issue
using UNSAFE method
draft getting cleared when reply body text is set to ''
draft saved to db never being retrieved at all in markdownEditor
, @feruzm please let me know if this is a bug or an expected behaviour, there is a draftsScreen
but I am not sure how users access it in app.
This snippet inside save current draft cancel draft saving to local storage if user is editing a draft saved on backend.
It seems as if it is placed on purpose which I do not understand yet but the problem is, if the user was indeed editing a pre-saved draft and exists the editor without tapping the save button... there will be no record of those edits anywhere, neither on phone nor in the backend.
And this could possibly be what nina have been experiencing. there are 2 possibilities for her...
she opened the editor from one of draft, edited it, closed the editor without saving to DB again,
According to her description, it seem 1. could possibly be her issue.
@feruzm suggest an expected flow for this
Nina (the user) she usually has issues with draft for some reason, draft save doesn't work for her, or she writes some text and goes to other screens and comes back and her draft is gone, etc. We should really check this draft flow. I know we save drafts to localstorage and backend as well, so there is combination when user is offline etc. cases, overall check on flow would be really good.
Steps to reproduce the behavior:
Expected behavior draft should only be cleared either on post publishing or user clear action