mirror of
https://github.com/moparisthebest/k-9
synced 2024-12-26 01:28:50 -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);
|
open(OpenMode.READ_WRITE);
|
||||||
ArrayList<LocalMessage> messages = new ArrayList<LocalMessage>();
|
ArrayList<LocalMessage> messages = new ArrayList<LocalMessage>();
|
||||||
Cursor cursor = null;
|
Cursor cursor = null;
|
||||||
int totalSeen = 0;
|
|
||||||
int i;
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
||||||
while (true)
|
|
||||||
{
|
|
||||||
|
|
||||||
// pull out messages most recent first, since that's what the default sort is
|
// pull out messages most recent first, since that's what the default sort is
|
||||||
cursor = mDb.rawQuery(
|
cursor = mDb.rawQuery(
|
||||||
"SELECT subject, sender_list, date, uid, flags, id, to_list, cc_list, "
|
"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 "
|
+ "FROM messages "
|
||||||
+ "WHERE "
|
+ "WHERE "
|
||||||
+ (includeDeleted ? "" : "deleted = 0 AND ")
|
+ (includeDeleted ? "" : "deleted = 0 AND ")
|
||||||
+ " folder_id = ? ORDER BY date DESC LIMIT 25 OFFSET "+ totalSeen
|
+ " folder_id = ? ORDER BY date DESC"
|
||||||
, new String[]
|
, new String[]
|
||||||
{
|
{
|
||||||
Long.toString(mFolderId)
|
Long.toString(mFolderId)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
i = 0;
|
int i = 0;
|
||||||
ArrayList<LocalMessage> messagesForHeaders = new ArrayList<LocalMessage>();
|
ArrayList<LocalMessage> messagesForHeaders = new ArrayList<LocalMessage>();
|
||||||
while (cursor.moveToNext())
|
while (cursor.moveToNext())
|
||||||
{
|
{
|
||||||
@ -1300,19 +1294,9 @@ public class LocalStore extends Store implements Serializable
|
|||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
totalSeen += i;
|
|
||||||
if ( i == 0 ) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
cursor.close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (listener != null)
|
if (listener != null)
|
||||||
{
|
{
|
||||||
listener.messagesFinished(totalSeen);
|
listener.messagesFinished(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
@ -1615,8 +1599,6 @@ public class LocalStore extends Store implements Serializable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void saveHeaders(long id, MimeMessage message)
|
private void saveHeaders(long id, MimeMessage message)
|
||||||
{
|
{
|
||||||
deleteHeaders(id);
|
deleteHeaders(id);
|
||||||
@ -2060,7 +2042,6 @@ public class LocalStore extends Store implements Serializable
|
|||||||
private int mAttachmentCount;
|
private int mAttachmentCount;
|
||||||
private String mSubject;
|
private String mSubject;
|
||||||
|
|
||||||
|
|
||||||
private boolean mHeadersLoaded = false;
|
private boolean mHeadersLoaded = false;
|
||||||
private boolean mMessageDirty = false;
|
private boolean mMessageDirty = false;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user