Merge pull request #5088 from matrix-org/t3chguy/notifications/14880

Decouple Audible notifications from Desktop notifications
This commit is contained in:
Michael Telatynski
2020-08-08 10:49:39 +01:00
committed by GitHub
5 changed files with 31 additions and 31 deletions

View File

@@ -19,7 +19,6 @@ import { MatrixClient } from 'matrix-js-sdk/src/client';
import { _td } from '../languageHandler';
import {
AudioNotificationsEnabledController,
NotificationBodyEnabledController,
NotificationsEnabledController,
} from "./controllers/NotificationControllers";
@@ -460,7 +459,6 @@ export const SETTINGS: {[setting: string]: ISetting} = {
"audioNotificationsEnabled": {
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
default: true,
controller: new AudioNotificationsEnabledController(),
},
"enableWidgetScreenshots": {
supportedLevels: LEVELS_ACCOUNT_SETTINGS,

View File

@@ -79,12 +79,3 @@ export class NotificationBodyEnabledController extends SettingController {
return calculatedValue;
}
}
export class AudioNotificationsEnabledController extends SettingController {
public getValueOverride(level: SettingLevel, roomId: string, calculatedValue: any): any {
if (!getNotifier().isPossible()) return false;
// Note: Audio notifications are *not* enabled by default.
return calculatedValue;
}
}