Reset unread/flagged count on "empty trash"
This commit is contained in:
parent
5a8ddaa039
commit
e8eae37389
2 changed files with 4 additions and 3 deletions
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue