mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-23 18:02:15 -05:00
Should retrieve just visibleLimit messages when the local folder is cleared.
This commit is contained in:
parent
cb46f170cd
commit
b4f3712246
@ -793,7 +793,7 @@ public class MessagingController implements Runnable {
|
||||
LocalStore localStore = account.getLocalStore();
|
||||
LocalFolder localFolder = localStore.getFolder(folder);
|
||||
if (localFolder.getVisibleLimit() > 0) {
|
||||
localFolder.setVisibleLimit(localFolder.getVisibleLimit() + account.getDisplayCount());
|
||||
localFolder.setVisibleLimit(localFolder.getVisibleLimit() + localFolder.getMessageCount());
|
||||
}
|
||||
synchronizeMailbox(account, folder, listener, null);
|
||||
} catch (MessagingException me) {
|
||||
|
@ -485,9 +485,6 @@ public class LocalStore extends Store implements Serializable {
|
||||
cursor = db.rawQuery("SELECT COUNT(*) FROM messages", null);
|
||||
cursor.moveToFirst();
|
||||
return cursor.getInt(0); // message count
|
||||
|
||||
|
||||
|
||||
} finally {
|
||||
if (cursor != null) {
|
||||
cursor.close();
|
||||
@ -497,8 +494,6 @@ public class LocalStore extends Store implements Serializable {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void getMessageCounts(final AccountStats stats) throws MessagingException {
|
||||
final Account.FolderMode displayMode = mAccount.getFolderDisplayMode();
|
||||
|
||||
@ -1269,7 +1264,7 @@ public class LocalStore extends Store implements Serializable {
|
||||
}
|
||||
Cursor cursor = null;
|
||||
try {
|
||||
cursor = db.rawQuery("SELECT COUNT(*) FROM messages WHERE folder_id = ?",
|
||||
cursor = db.rawQuery("SELECT COUNT(*) FROM messages WHERE deleted = 0 and folder_id = ?",
|
||||
new String[] {
|
||||
Long.toString(mFolderId)
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user