Open farson2003 opened 7 years ago
The processing can't happen in the background because encryption might involve user interaction, i.e. they might need to enter their passphrase.
However, allowing multiple button clicks is a bug of course.
@cketti Agreed on the last point, however please note that even after all user interaction has finished (i.e. user has entered passphrase), the message compose window still remains open and the problem persists.
In principle once the user has entered correct passphrase the whole remaining encryption and sending process could and ideally should be moved to the background, so that the user can go on with other workflow.
Hi - I would to work on this. I can think of the following solutions 1) Move the encryption to the background using an async task and return to the previous activity 2) Freeze the send button before beginning encryption 3) Display a message saying "encryption in progress, please wait" which closes only when encryption is complete
Please let me know your thoughts
Options two and three are reasonable and can be done together.
Option 1 is not possible because we can't know whether further user interaction will be required or not - that's up to OpenKeychain.
It would be nice to show a progress bar using feedback from OpenKeychain but we will need to coordinate that with them so they send progress updates.
For now an indeterminate progress spinner is probably fine.
Expected behavior
However, when encrypting an email with a bigger attachment, the Actual and incorrect behavior is the following:
Steps to reproduce
Solution:
The email compose screen should close immediately after hitting the send button of an encrypted email with a bigger attachment and K9 should process the email in the background, because this is the usual behaviour for unencrypted emails with attachments. Anyways the message compose screen should not allow any buttons to be still pressed to trigger multiple sending processes of the same email.
Environment
K-9 Mail version: 5.206 Openkeychain: 4.2.4 (42400)
Android version: 4.4.2 and others
Account type IMAP