Squelch notifications for active desktop converastions

Additionally, limit audible notifications to once every 2 seconds.

// FREEBIE

Fixes #4905
Fixes #3165
Closes #5813
This commit is contained in:
Moxie Marlinspike
2016-11-24 08:09:34 -08:00
parent 7c0dacc627
commit 3787551878
2 changed files with 115 additions and 9 deletions

View File

@@ -270,6 +270,8 @@ public class PushDecryptJob extends ContextJob {
DatabaseFactory.getThreadDatabase(getContext()).setRead(threadId);
MessageNotifier.updateNotification(getContext(), masterSecret.getMasterSecret().orNull());
}
MessageNotifier.setLastDesktopActivityTimestamp(message.getTimestamp());
}
private void handleSynchronizeRequestMessage(@NonNull MasterSecretUnion masterSecret,
@@ -315,6 +317,8 @@ public class PushDecryptJob extends ContextJob {
}
}
MessageNotifier.setLastDesktopActivityTimestamp(envelopeTimestamp);
MessageNotifier.cancelDelayedNotifications();
MessageNotifier.updateNotification(context, masterSecret.getMasterSecret().orNull());
}