envoyer icon indicating copy to clipboard operation
envoyer copied to clipboard

Allow message content fetches while a sync is in progress

Open matzipan opened this issue 4 years ago • 1 comments

Currently, when a full sync is taking place (for example when there's a UID validity mismatch, or when a new folder is being opened), we are unable to trigger a message content fetch until the sync has finished. This is because the connection lock is held by the sync and the content fetching job times out. A solution would likely involve having a separate thread and server connection just for message content fetches.

Since syncing will happen in a different thread, if some messages can be removed in the meanwhile, the message content fetch needs to also check if the message still exists before trying to update the database.

matzipan avatar Jan 02 '22 17:01 matzipan

On second thought I think when a UID validity mismatch is detected, maybe we shouldn't even download the message content because we will be downloading for the wrong UID that we have locally. Is this assumption correct?

matzipan avatar Jan 02 '22 17:01 matzipan

Message fetch connection is now implemented.

matzipan avatar Nov 01 '23 23:11 matzipan