1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-12-25 00:58:50 -05:00

Marking a message as read in the database is currently very expensive, especially if you have threading enabled.

Defer that until _after_ telling listeners that they're cool to show the message
This commit is contained in:
Jesse Vincent 2013-07-11 16:09:52 -04:00
parent 1bed455e4f
commit bcc2263e07

View File

@ -3117,7 +3117,6 @@ public class MessagingController implements Runnable {
return;
}
markMessageAsReadOnView(account, message);
for (MessagingListener l : getListeners(listener)) {
l.loadMessageForViewHeadersAvailable(account, folder, uid, message);
@ -3138,6 +3137,7 @@ public class MessagingController implements Runnable {
for (MessagingListener l : getListeners(listener)) {
l.loadMessageForViewFinished(account, folder, uid, message);
}
markMessageAsReadOnView(account, message);
} catch (Exception e) {
for (MessagingListener l : getListeners(listener)) {