mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-27 19:52:17 -05:00
Prevent needlessly downloading every message > 5K the first time it's opened (affected POP3 and WebDav)
This commit is contained in:
parent
0bf5dcf95b
commit
7e492a0505
@ -1007,9 +1007,19 @@ s * critical data as fast as possible, and then we'll fill in the de
|
|||||||
|
|
||||||
Message localMessage = localFolder.getMessage(message.getUid());
|
Message localMessage = localFolder.getMessage(message.getUid());
|
||||||
|
|
||||||
// Set a flag indicating that the message has been partially downloaded and
|
/*
|
||||||
// is ready for view.
|
* Mark the message as fully downloaded if the message size is smaller than
|
||||||
localMessage.setFlag(Flag.X_DOWNLOADED_PARTIAL, true);
|
* the FETCH_BODY_SANE_SUGGESTED_SIZE, otherwise mark as only a partial
|
||||||
|
* download. This will prevent the system from downloading the same message
|
||||||
|
* twice.
|
||||||
|
*/
|
||||||
|
if (message.getSize() < Store.FETCH_BODY_SANE_SUGGESTED_SIZE) {
|
||||||
|
localMessage.setFlag(Flag.X_DOWNLOADED_FULL, true);
|
||||||
|
} else {
|
||||||
|
// Set a flag indicating that the message has been partially downloaded and
|
||||||
|
// is ready for view.
|
||||||
|
localMessage.setFlag(Flag.X_DOWNLOADED_PARTIAL, true);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
* We have a structure to deal with, from which
|
* We have a structure to deal with, from which
|
||||||
|
Loading…
Reference in New Issue
Block a user