mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-27 19:52:17 -05:00
Issue 553
This commit is contained in:
parent
f1232a119a
commit
f6c6012e11
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user