1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-24 02:12:15 -05:00

Issue 553

This commit is contained in:
Daniel Applebaum 2009-07-24 03:55:54 +00:00
parent f1232a119a
commit f6c6012e11

View File

@ -1021,17 +1021,25 @@ public class LocalStore extends Store implements Serializable {
int i = 0;
ArrayList<LocalMessage> messagesForHeaders = new ArrayList<LocalMessage>();
while (cursor.moveToNext()) {
LocalMessage message = new LocalMessage(null, this);
populateMessageFromGetMessageCursor(message, cursor);
messages.add(message);
messagesForHeaders.add(message);
if (messagesForHeaders.size() >= 50)
{
populateHeaders(messagesForHeaders);
messagesForHeaders.clear();
}
if (listener != null) {
listener.messageFinished(message, i, -1);
}
i++;
}
populateHeaders(messages);
populateHeaders(messagesForHeaders);
}
finally {
if (cursor != null) {