setting to disable notifications for new contacts

also mute these notifications between 23:00 and 09:00

fixes #4572
Closes #4926
This commit is contained in:
agrajaghh
2015-12-19 13:07:44 +01:00
committed by Moxie Marlinspike
parent d238e2bbc5
commit ed592950c0
5 changed files with 33 additions and 3 deletions

View File

@@ -121,6 +121,15 @@ public class MessageNotifier {
@Nullable MasterSecret masterSecret,
boolean includePushDatabase,
long threadId)
{
updateNotification(context, masterSecret, includePushDatabase, threadId, true);
}
public static void updateNotification(@NonNull Context context,
@Nullable MasterSecret masterSecret,
boolean includePushDatabase,
long threadId,
boolean signal)
{
boolean isVisible = visibleThread == threadId;
@@ -141,7 +150,7 @@ public class MessageNotifier {
if (isVisible) {
sendInThreadNotification(context, threads.getRecipientsForThreadId(threadId));
} else {
updateNotification(context, masterSecret, true, includePushDatabase, 0);
updateNotification(context, masterSecret, signal, includePushDatabase, 0);
}
}