1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-23 18:02:15 -05:00

Reset unread/flagged count on "empty trash"

This commit is contained in:
cketti 2012-01-27 00:51:18 +01:00
parent 5a8ddaa039
commit e8eae37389
2 changed files with 4 additions and 3 deletions

View File

@ -3470,12 +3470,13 @@ public class MessagingController implements Runnable {
putBackground("emptyTrash", listener, new Runnable() {
@Override
public void run() {
Folder localFolder = null;
LocalFolder localFolder = null;
try {
Store localStore = account.getLocalStore();
localFolder = localStore.getFolder(account.getTrashFolderName());
localFolder = (LocalFolder) localStore.getFolder(account.getTrashFolderName());
localFolder.open(OpenMode.READ_WRITE);
localFolder.setFlags(new Flag[] { Flag.DELETED }, true);
localFolder.resetUnreadAndFlaggedCounts();
for (MessagingListener l : getListeners()) {
l.emptyTrashCompleted(account);

View File

@ -2619,7 +2619,7 @@ public class LocalStore extends Store implements Serializable {
setVisibleLimit(mAccount.getDisplayCount());
}
private void resetUnreadAndFlaggedCounts() {
public void resetUnreadAndFlaggedCounts() {
try {
int newUnread = 0;
int newFlagged = 0;