Don't signal on updates from muted threads.

Fixes #3393
// FREEBIE
pull/1/head
Moxie Marlinspike 9 years ago
parent c05555c290
commit a11f6ea1e6

@ -124,10 +124,16 @@ public class MessageNotifier {
}
public static void updateNotification(Context context, MasterSecret masterSecret, long threadId) {
if (!TextSecurePreferences.isNotificationsEnabled(context)) {
Recipients recipients = DatabaseFactory.getThreadDatabase(context)
.getRecipientsForThreadId(threadId);
if (!TextSecurePreferences.isNotificationsEnabled(context) ||
(recipients != null && recipients.isMuted()))
{
return;
}
if (visibleThread == threadId) {
ThreadDatabase threads = DatabaseFactory.getThreadDatabase(context);
threads.setRead(threadId);

Loading…
Cancel
Save