Bug #721286 - IMAPx: read messages become unread when reopening Evolution
Couple things changed here:
a) the camel_folder_summary_get_changed() could return list of changed
messages only if they were loaded in memory, which is not correct - I
think it's part of the issue why it failed
b) it could happen that imapx_server_sync_changes() was called to save some
changes, but then didn't change anything; in such cases, messages marked
as locally changed were never unmarked, which led to false tests; I added
a function to unmark the messages as locally changed (this can cause slow
close of evolution for the first time, due to unsetting of the flag, but
later ends are fine)
c) state of the message flags on the server is the master state, except of
the state where locally stored info is marked as locally changed. This
allows to show proper state of messages on the server (it is influenced
by a) and b) too, so it might take up to two evolution starts to get
the same view in evolution as is the state on the server).