diff --git a/src/settings/SettingsStore.ts b/src/settings/SettingsStore.ts index 25ed99477f..aeed3321b6 100644 --- a/src/settings/SettingsStore.ts +++ b/src/settings/SettingsStore.ts @@ -402,7 +402,7 @@ export default class SettingsStore { level: SettingLevel, roomId: string, calculatedValue: any, - calculatedAtLevel: any, + calculatedAtLevel: SettingLevel, ): any { let resultingValue = calculatedValue; diff --git a/src/settings/controllers/NotificationControllers.ts b/src/settings/controllers/NotificationControllers.ts index ff38f41b7e..4a8a70362d 100644 --- a/src/settings/controllers/NotificationControllers.ts +++ b/src/settings/controllers/NotificationControllers.ts @@ -46,7 +46,12 @@ function getNotifier(): any { // TODO: [TS] Formal type that doesn't cause a cyc } export class NotificationsEnabledController extends SettingController { - public getValueOverride(level: SettingLevel, roomId: string, calculatedValue: any, calculatedAtLevel: any): any { + public getValueOverride( + level: SettingLevel, + roomId: string, + calculatedValue: any, + calculatedAtLevel: SettingLevel, + ): any { if (!getNotifier().isPossible()) return false; if (calculatedValue === null || calculatedAtLevel === "default") { diff --git a/src/settings/controllers/SettingController.ts b/src/settings/controllers/SettingController.ts index db7c10793e..d90eba1e9e 100644 --- a/src/settings/controllers/SettingController.ts +++ b/src/settings/controllers/SettingController.ts @@ -33,11 +33,16 @@ export default abstract class SettingController { * @param {String} roomId The room ID, may be null. * @param {*} calculatedValue The value that the handlers think the setting should be, * may be null. - * @param {string} calculatedAtLevel The level for which the calculated value was + * @param {SettingLevel} calculatedAtLevel The level for which the calculated value was * calculated at. May be null. * @return {*} The value that should be used, or null if no override is applicable. */ - public getValueOverride(level: SettingLevel, roomId: string, calculatedValue: any, calculatedAtLevel: any): any { + public getValueOverride( + level: SettingLevel, + roomId: string, + calculatedValue: any, + calculatedAtLevel: SettingLevel, + ): any { return null; // no override } diff --git a/src/settings/controllers/ThemeController.ts b/src/settings/controllers/ThemeController.ts index 01082a43a4..15dd64c901 100644 --- a/src/settings/controllers/ThemeController.ts +++ b/src/settings/controllers/ThemeController.ts @@ -22,7 +22,12 @@ import { SettingLevel } from "../SettingLevel"; export default class ThemeController extends SettingController { public static isLogin = false; - public getValueOverride(level: SettingLevel, roomId: string, calculatedValue: any, calculatedAtLevel: any): any { + public getValueOverride( + level: SettingLevel, + roomId: string, + calculatedValue: any, + calculatedAtLevel: SettingLevel, + ): any { if (!calculatedValue) return null; // Don't override null themes if (ThemeController.isLogin) return 'light';