Invalidate headers on message add, delete, change

This commit is contained in:
M66B 2019-06-25 10:16:03 +02:00
parent 5f847a1f49
commit 272d1adecb
1 changed files with 6 additions and 0 deletions

View File

@ -845,6 +845,8 @@ public class ServiceSynchronize extends LifecycleService {
} catch (Throwable ex) {
Log.e(folder.name, ex);
db.folder().setFolderError(folder.id, Helper.formatThrowable(ex));
} finally {
((IMAPMessage) imessage).invalidateHeaders();
}
int count = ifolder.getMessageCount();
@ -876,6 +878,8 @@ public class ServiceSynchronize extends LifecycleService {
Log.i(folder.name + " deleted uid=" + uid + " count=" + count);
} catch (MessageRemovedException ex) {
Log.w(folder.name, ex);
} finally {
((IMAPMessage) imessage).invalidateHeaders();
}
int count = ifolder.getMessageCount();
@ -933,6 +937,8 @@ public class ServiceSynchronize extends LifecycleService {
} catch (Throwable ex) {
Log.e(folder.name, ex);
db.folder().setFolderError(folder.id, Helper.formatThrowable(ex));
} finally {
((IMAPMessage) e.getMessage()).invalidateHeaders();
}
} catch (Throwable ex) {
Log.e(folder.name, ex);