Element-android: Persist text in composer when leaving room screen

Created on 11 Jul 2019  路  3Comments  路  Source: vector-im/element-android

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

design draft legacy-feature showstopper

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)

All 3 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

steef435 picture steef435  路  3Comments

Flam3z picture Flam3z  路  3Comments

David-Else picture David-Else  路  3Comments

532910 picture 532910  路  3Comments

TR-SLimey picture TR-SLimey  路  3Comments