Don't signal on updates from muted threads.

Fixes #3393
// FREEBIE
This commit is contained in:
Moxie Marlinspike 2015-06-11 13:10:39 -07:00
parent c05555c290
commit a11f6ea1e6

View File

@ -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);