Skip to content
Commit 0671e1af authored by Jan Kundrát's avatar Jan Kundrát
Browse files

GUI: update mailbox contents whenever clicking through messages or mailboxes

The IMAP code is currently multiplexing a single connection among many
mailboxes. There are situations where a parallel action might switch away from
the "currently selected" mailbox, at least as shown in the UI, to some other
place. An example of such action is when the composer wants to make a message
with the \Answered flag.

Typically, the mailbox is automatically switched when the user opens a message --
either because of the request to have it marked as read, or because some of the
parts are not available form the cache. However, if the message being opened was
already cached and marked as read, no IMAP traffic was actually required, and
therefore there was no reason for issuing a SELECT, either.

This might or might not be the best fix -- from the user's point of view, it
makes a lot of sense to receive updates about mailbox state as often as
possible, and having the mailbox opened (with the usual IDLE or NOP polling) is
the usual way to go. On the other hand, this might result in slightly bigger
IMAP traffic, especially on servers which do not support CONDSTORE/QRESYNC.

The ideal fix for the future is to switch to multiple connections, but that
opens a whole new can of worms. In the meanwhile, let's just fulfil the naive
expectation that clicking on any message in a mailbox (or any mailbox, for that
matter) will at least refresh the current view.

REVIEW: 112158
parent 2258f975
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment