Labs: Add quick/cheap "do not disturb" flag

This just disables audio notifications and the popup, which is the easiest way to do "do not disturb" for a device. This needs spec changes to be done properly, as it's a shame that mobile devices for the user will still go off.

Disabling all of push doesn't sound ideal as it would potentially mean missing highlights for when leaving DND mode.
This commit is contained in:
Travis Ralston
2021-04-15 00:47:09 -06:00
parent 2fb241cfc2
commit eed5efdbe1
5 changed files with 64 additions and 0 deletions

View File

@@ -383,6 +383,10 @@ export const Notifier = {
// don't bother notifying as user was recently active in this room
return;
}
if (SettingsStore.getValue("doNotDisturb")) {
// Don't bother the user if they didn't ask to be bothered
return;
}
if (this.isEnabled()) {
this._displayPopupNotification(ev, room);