Currently, the draft is lost.
We can also ask the user what he wants to do:
- do not quit the screen
- save the draft
- discard the draft
After internal discussion and @violoncelloCH comment, we just save the draft
- also display a toast to notify/warn that the message was not sent
this idea is also rejected
The related message in case of quoting/replying/editing should be saved to
This may be managed by the SDK, maybe using the local echo with a new sentState DRAFT, or on a completely separated db table
I would just keep the draft by default and not ask the user...
I guess that's the most convenient way, because it doesn't gets cumbersome if you want to switch between multiple rooms... also if you really want to delete your draft, it's easy to just remove the text via the keyboard (/ select all / cut)
I agree with the above message. I also think that drafts should probably be saved regularly, as RiotX crashed while I was writing a long message, a couple days ago.
Automatically restoring the previous content after a crash (or any other unexpected shutdown, like the battery getting completely drained) would be a nice feature.
It means that we have to save the draft after each edition and just before leaving the room screen, to be robust against crash.
Most helpful comment
I would just keep the draft by default and not ask the user...
I guess that's the most convenient way, because it doesn't gets cumbersome if you want to switch between multiple rooms... also if you really want to delete your draft, it's easy to just remove the text via the keyboard (/ select all / cut)