|
|
@ -124,10 +124,16 @@ public class MessageNotifier {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static void updateNotification(Context context, MasterSecret masterSecret, long threadId) {
|
|
|
|
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;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (visibleThread == threadId) {
|
|
|
|
if (visibleThread == threadId) {
|
|
|
|
ThreadDatabase threads = DatabaseFactory.getThreadDatabase(context);
|
|
|
|
ThreadDatabase threads = DatabaseFactory.getThreadDatabase(context);
|
|
|
|
threads.setRead(threadId);
|
|
|
|
threads.setRead(threadId);
|
|
|
|