1
0
mirror of https://github.com/moparisthebest/k-9 synced 2025-01-08 04:08:15 -05:00

Remove double synchronization

This commit is contained in:
cketti 2015-06-25 18:27:50 +02:00
parent 23c49d834d
commit f8ea923522

View File

@ -1810,18 +1810,16 @@ public class MessagingController implements Runnable {
synchronized (data) {
MessageReference ref = localMessage.makeMessageReference();
if (data.removeMatchingMessage(context, ref)) {
synchronized (data) {
// if we remove a single message from the notification,
// maybe there is a stacked notification active for that one message
Integer childNotification = data.getStackedChildNotification(ref);
if (childNotification != null) {
NotificationManager notificationManager =
(NotificationManager)context.getSystemService(Context.NOTIFICATION_SERVICE);
notificationManager.cancel(childNotification);
}
// update the (summary-) notification
notifyAccountWithDataLocked(context, account, null, data);
// if we remove a single message from the notification,
// maybe there is a stacked notification active for that one message
Integer childNotification = data.getStackedChildNotification(ref);
if (childNotification != null) {
NotificationManager notificationManager =
(NotificationManager)context.getSystemService(Context.NOTIFICATION_SERVICE);
notificationManager.cancel(childNotification);
}
// update the (summary-) notification
notifyAccountWithDataLocked(context, account, null, data);
}
}
}