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:
parent
5a8ddaa039
commit
e8eae37389
@ -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 New Issue
Block a user