public static void updateNotification(Context context, MasterSecret masterSecret) { if (!SMSSecurePreferences.isNotificationsEnabled(context)) { return; } updateNotification(context, masterSecret, false, 0); }
public static void updateNotification(Context context, MasterSecret masterSecret, long threadId) { Recipients recipients = DatabaseFactory.getThreadDatabase(context).getRecipientsForThreadId(threadId); if (!SMSSecurePreferences.isNotificationsEnabled(context) || (recipients != null && recipients.isMuted())) { return; } if (visibleThread == threadId) { ThreadDatabase threads = DatabaseFactory.getThreadDatabase(context); threads.setRead(threadId); sendInThreadNotification(context, threads.getRecipientsForThreadId(threadId)); } else { updateNotification(context, masterSecret, true, 0); } }