mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-30 13:12:25 -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() {
|
putBackground("emptyTrash", listener, new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Folder localFolder = null;
|
LocalFolder localFolder = null;
|
||||||
try {
|
try {
|
||||||
Store localStore = account.getLocalStore();
|
Store localStore = account.getLocalStore();
|
||||||
localFolder = localStore.getFolder(account.getTrashFolderName());
|
localFolder = (LocalFolder) localStore.getFolder(account.getTrashFolderName());
|
||||||
localFolder.open(OpenMode.READ_WRITE);
|
localFolder.open(OpenMode.READ_WRITE);
|
||||||
localFolder.setFlags(new Flag[] { Flag.DELETED }, true);
|
localFolder.setFlags(new Flag[] { Flag.DELETED }, true);
|
||||||
|
localFolder.resetUnreadAndFlaggedCounts();
|
||||||
|
|
||||||
for (MessagingListener l : getListeners()) {
|
for (MessagingListener l : getListeners()) {
|
||||||
l.emptyTrashCompleted(account);
|
l.emptyTrashCompleted(account);
|
||||||
|
@ -2619,7 +2619,7 @@ public class LocalStore extends Store implements Serializable {
|
|||||||
setVisibleLimit(mAccount.getDisplayCount());
|
setVisibleLimit(mAccount.getDisplayCount());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void resetUnreadAndFlaggedCounts() {
|
public void resetUnreadAndFlaggedCounts() {
|
||||||
try {
|
try {
|
||||||
int newUnread = 0;
|
int newUnread = 0;
|
||||||
int newFlagged = 0;
|
int newFlagged = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user