K-9: K9 UI error when sending encrypted email with attachment

Created on 29 Mar 2017  Â·  4Comments  Â·  Source: k9mail/k-9

Expected behavior

  1. Create email in message compose screen, enter recipient, to which encrypted email is to be sent.
  2. Chose attachment of bigger file size, i.e. 5 MB, so that encryption takes some time on the device.
  3. Hit the "send" button.
  4. The message compose screen should close and K9 should work in the background sending the email (this is the actual and correct behaviour when an unencrypted email with a bigger attachment is sent.)

However, when encrypting an email with a bigger attachment, the Actual and incorrect behavior
is the following:

Steps to reproduce

  1. Create email in message compose screen, enter recipient, to which encrypted email is to be sent.
  2. Chose attachment of bigger file size, i.e. 5 MB, so that encryption takes some time on the device.
  3. Hit the "send" button.
  4. "Wheel will turn" and K9 together whith Openkeycheyn will encrypt email. However, the message compose screen remains open, which is confusing for the user, because when sending an unencrypted email it ussually closes straight away after hitting send buttonc(see above).
    The user is therefore inclined to hit the "send button" multiple times to make sure K9 has acknowledged the sending command, which results in the same email to be sent out to the same recipient multiple times.
    This is confusing.

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

bug

All 4 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jimimaseye picture jimimaseye  Â·  3Comments

asbach2 picture asbach2  Â·  3Comments

SpatMan05 picture SpatMan05  Â·  3Comments

philipwhiuk picture philipwhiuk  Â·  3Comments

raychinov picture raychinov  Â·  4Comments