mustang-im / mustang

Mustang - New full-featured desktop email, chat and video conference client
https://mustang.im
Other
5 stars 0 forks source link

IMAP: Delete too slow #105

Open benbucksch opened 1 week ago

benbucksch commented 1 week ago

Reproduction:

Expected result:

Actual result:

Dev:

NeilRashbrook commented 1 week ago

I wasn't able to reproduce this, so I'm going off code inspection here. The front end deletes all of the messages in separate IMAP commands. This itself isn't a bug because the user could do the same thing by hitting the Delete key five times in quick succession. However, this does allow for a count notification to arrive before all of the deletions have been able to process. At this point the folder will try to refresh its message list, which will include the messages that are still pending deletion.

At this point it could be that the messages are already marked as deleted pending expunge, and it's up to the folder not to add those messages back to the message list when it refreshes itself, but it's also possible that the messages may simply not have been marked as deleted on the server yet, so it would be better to assume that the latter is the case here.

NeilRashbrook commented 1 week ago

Actually it doesn't even need to be a count notification - the flag change notification for the mark as deleted flag might be what's triggering the refresh.