Ignore the default value when calculating if notifications are enabled
This is to make the "Enable desktop notifications" checkbox accurately reflect the user's preference. The device-level setting is still respected. Signed-off-by: Travis Ralston <travpc@gmail.com>
This commit is contained in:
@@ -35,11 +35,11 @@ function isMasterRuleEnabled() {
|
||||
}
|
||||
|
||||
export class NotificationsEnabledController extends SettingController {
|
||||
getValueOverride(level, roomId, calculatedValue) {
|
||||
getValueOverride(level, roomId, calculatedValue, calculatedAtLevel) {
|
||||
const Notifier = require('../../Notifier'); // avoids cyclical references
|
||||
if (!Notifier.isPossible()) return false;
|
||||
|
||||
if (calculatedValue === null) {
|
||||
if (calculatedValue === null || calculatedAtLevel === "default") {
|
||||
return isMasterRuleEnabled();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user