mirror of
https://github.com/moparisthebest/k-9
synced 2024-12-25 09:08:49 -05:00
Revert "Initial implementation of loading only 25 rows from the message list"
This reverts commit 7056cb918e3bc71465053bff4070b8d3b28761a7.
This commit is contained in:
parent
18ea30d00f
commit
85b4c43e10
@ -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,19 +1294,9 @@ public class LocalStore extends Store implements Serializable
|
||||
}
|
||||
i++;
|
||||
}
|
||||
totalSeen += i;
|
||||
if ( i == 0 ) {
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
cursor.close();
|
||||
}
|
||||
}
|
||||
|
||||
if (listener != null)
|
||||
{
|
||||
listener.messagesFinished(totalSeen);
|
||||
listener.messagesFinished(i);
|
||||
}
|
||||
}
|
||||
finally
|
||||
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user