1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-10-31 15:45:08 -04:00

Revert "Initial implementation of loading only 25 rows from the message list"

This reverts commit 7056cb918e3bc71465053bff4070b8d3b28761a7.
This commit is contained in:
Jesse Vincent 2009-12-16 05:26:21 +00:00
parent 18ea30d00f
commit 85b4c43e10

View File

@ -1264,14 +1264,8 @@ public class LocalStore extends Store implements Serializable
open(OpenMode.READ_WRITE);
ArrayList<LocalMessage> messages = new ArrayList<LocalMessage>();
Cursor cursor = null;
int totalSeen = 0;
int i;
try
{
while (true)
{
// pull out messages most recent first, since that's what the default sort is
cursor = mDb.rawQuery(
"SELECT subject, sender_list, date, uid, flags, id, to_list, cc_list, "
@ -1279,14 +1273,14 @@ public class LocalStore extends Store implements Serializable
+ "FROM messages "
+ "WHERE "
+ (includeDeleted ? "" : "deleted = 0 AND ")
+ " folder_id = ? ORDER BY date DESC LIMIT 25 OFFSET "+ totalSeen
+ " folder_id = ? ORDER BY date DESC"
, new String[]
{
Long.toString(mFolderId)
});
i = 0;
int i = 0;
ArrayList<LocalMessage> messagesForHeaders = new ArrayList<LocalMessage>();
while (cursor.moveToNext())
{
@ -1300,21 +1294,11 @@ public class LocalStore extends Store implements Serializable
}
i++;
}
totalSeen += i;
if ( i == 0 ) {
break;
}
else
if (listener != null)
{
cursor.close();
listener.messagesFinished(i);
}
}
if (listener != null)
{
listener.messagesFinished(totalSeen);
}
}
finally
{
if (cursor != null)
@ -1615,8 +1599,6 @@ public class LocalStore extends Store implements Serializable
}
}
private void saveHeaders(long id, MimeMessage message)
{
deleteHeaders(id);
@ -2060,7 +2042,6 @@ public class LocalStore extends Store implements Serializable
private int mAttachmentCount;
private String mSubject;
private boolean mHeadersLoaded = false;
private boolean mMessageDirty = false;