mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-24 02:12: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();
|
LocalStore localStore = account.getLocalStore();
|
||||||
LocalFolder localFolder = localStore.getFolder(folder);
|
LocalFolder localFolder = localStore.getFolder(folder);
|
||||||
if (localFolder.getVisibleLimit() > 0) {
|
if (localFolder.getVisibleLimit() > 0) {
|
||||||
localFolder.setVisibleLimit(localFolder.getVisibleLimit() + account.getDisplayCount());
|
localFolder.setVisibleLimit(localFolder.getVisibleLimit() + localFolder.getMessageCount());
|
||||||
}
|
}
|
||||||
synchronizeMailbox(account, folder, listener, null);
|
synchronizeMailbox(account, folder, listener, null);
|
||||||
} catch (MessagingException me) {
|
} catch (MessagingException me) {
|
||||||
|
@ -485,9 +485,6 @@ public class LocalStore extends Store implements Serializable {
|
|||||||
cursor = db.rawQuery("SELECT COUNT(*) FROM messages", null);
|
cursor = db.rawQuery("SELECT COUNT(*) FROM messages", null);
|
||||||
cursor.moveToFirst();
|
cursor.moveToFirst();
|
||||||
return cursor.getInt(0); // message count
|
return cursor.getInt(0); // message count
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} finally {
|
} finally {
|
||||||
if (cursor != null) {
|
if (cursor != null) {
|
||||||
cursor.close();
|
cursor.close();
|
||||||
@ -497,8 +494,6 @@ public class LocalStore extends Store implements Serializable {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void getMessageCounts(final AccountStats stats) throws MessagingException {
|
public void getMessageCounts(final AccountStats stats) throws MessagingException {
|
||||||
final Account.FolderMode displayMode = mAccount.getFolderDisplayMode();
|
final Account.FolderMode displayMode = mAccount.getFolderDisplayMode();
|
||||||
|
|
||||||
@ -1269,7 +1264,7 @@ public class LocalStore extends Store implements Serializable {
|
|||||||
}
|
}
|
||||||
Cursor cursor = null;
|
Cursor cursor = null;
|
||||||
try {
|
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[] {
|
new String[] {
|
||||||
Long.toString(mFolderId)
|
Long.toString(mFolderId)
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user