Author Topic: Bug: Selected messages change if a mail fetch happens whilst selected (IMAP)  (Read 1978 times)

chorazin

  • Newbie
  • *
  • Posts: 5
Environment: Aquamail Pro latest version, Android 5.0.2 on a Sony Xperia Z Tablet, mailbox concerned uses IMAP with automatic timed fetching.

I'm preparing to delete various emails, say I select the 2nd, 3rd, 4th and 6th newest emails for deletion.

Whilst I'm selecting these emails an automatic mail fetch happens. One new mail arrives and is shown as the 1st in the list.

However, the 2nd, 3rd, 4th and 6th emails are still selected BUT these are not the same emails as before since the whole listing has moved down by one with the new message at the top of the listing but the selection has not moved.

This means that if the delete operation is performed, the wrong emails get deleted - the 2nd, 3rd, 4th and 6th get deleted, but what were the 2nd, 3rd, 4th and 6th when they were selected are now in reality the 3rd, 4th, 5th and 7th.

The pictures show a simpler example of the same thing:-

Screenshot 1. Select the email for deletion

Screenshot 2. Another email comes in, the first item remains selected although it's not the same email that was selected. The mail that's supposed to get deleted is now unselected.

Screenshot 3. Do the deletion of selected emails, the wrong one gets deleted

This example makes it easy to see what's going on, but if many emails are being selected for deletion it's easy to miss this when it happens. This may also be an issue if a new email arrives during the deletion - I haven't tried testing for that.

When a mail fetch happens and new mail arrives while there is a selection either the selection needs to be adjusted automatically (if possible) or reset to no selection (if not possible to adjust)

Regards

Alan



Anton Donchev

  • Newbie
  • *
  • Posts: 32
Hi Alan,

Could you give us more information on how you are able to reproduce the issue?
A video and log file would be helpful.
There is help on how to get log here - https://www.aqua-mail.com/troubleshooting/.

So far we are unable to reproduce it.

Thanks,
Anton.
   AquaMail Developer

chorazin

  • Newbie
  • *
  • Posts: 5
Hi,

I've just sent through the log file along with the steps performed whilst logging was active.

Regards

Alan

Anton Donchev

  • Newbie
  • *
  • Posts: 32
Hi Alan,

We noticed in the log that a lot of messages are synced, could you check what is the Sync Message Count set in AquaMail Settings?

Settings -> Mail, receiving -> Messages to sync (default 50)

Please check if this is a big number and if it is try setting it to 50 which is the default.
Your device is taking a lot of time to sync, which might be causing the issues you are experiencing.

If the issue still occurs could you try lowering the Messages to sync to it's lowest value of 15 and check if this resolves it?

Please let us know of the results.

Thanks,
Anton.
   AquaMail Developer

chorazin

  • Newbie
  • *
  • Posts: 5
Hi Anton,

Putting it down to  50 and 15 does solve it - the selection stays with the message that was selected.

What's strange is that I was avoiding selecting the messages while a fetch was in progress (as shown by the indication beside the folder/account name).

What's the maximum safe value? I have a pretty busy mailbox.

Thanks,

Alan

Anton Donchev

  • Newbie
  • *
  • Posts: 32
Hi Alan,

The highest setting depends on your device performance, you can try experimenting with increasing it.
If the issue starts to re-appear. than just lower it a bit and this way you can find the setting that works best for you.

Thanks,
Anton.
   AquaMail Developer

chorazin

  • Newbie
  • *
  • Posts: 5
Hi Anton,

Thanks - I'll experiment with the setting.

Let's call this closed for now, though it'd be great if some sort of protection against choosing high values on underpowered devices could be added.

Regards

Alan