Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not clear the draft if sending failed #4340

Merged
merged 2 commits into from
Nov 28, 2024

Conversation

link2xt
Copy link
Collaborator

@link2xt link2xt commented Nov 14, 2024

No description provided.

@link2xt
Copy link
Collaborator Author

link2xt commented Nov 14, 2024

This is needed for #4342 (see also Android issue deltachat/deltachat-android#3428), but makes sense regardless of whether sending is allowed, there may be other reasons for failing.

@WofWca
Copy link
Collaborator

WofWca commented Nov 19, 2024

This change makes sense to me. textareaRef is disabled until the message has been sent and the draft cleared.
Have you checked if the behavior is alright if sendMessagePromise takes some time to resolve?
Does it feel sluggish?

@link2xt link2xt force-pushed the link2xt/dont-clear-draft-if-cant-send branch 2 times, most recently from e3cb264 to 42dfbbb Compare November 21, 2024 18:12
@nicodh nicodh force-pushed the link2xt/dont-clear-draft-if-cant-send branch from 42dfbbb to bbcd890 Compare November 28, 2024 17:23
@nicodh
Copy link
Member

nicodh commented Nov 28, 2024

Have you checked if the behavior is alright if sendMessagePromise takes some time to resolve?

I think we can merge this, it is very theoretical "sendMessagePromise" is fulfilled when the draft is in database. It's not waiting fpor network (I tested it)

@nicodh nicodh merged commit dc5ffe5 into main Nov 28, 2024
10 checks passed
@nicodh nicodh deleted the link2xt/dont-clear-draft-if-cant-send branch November 28, 2024 23:21
@link2xt
Copy link
Collaborator Author

link2xt commented Nov 28, 2024

Encryption may take some time, so it is a bit slower this way, but there is nothing waiting for the network, only adding encrypted MIME message to the queue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants