From ef062c3511ad8c7182f4903203e41b2d477b076f Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 28 Jul 2020 15:22:54 -0600 Subject: [PATCH] Convert ThemeController to TS --- .../controllers/{ThemeController.js => ThemeController.ts} | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) rename src/settings/controllers/{ThemeController.js => ThemeController.ts} (81%) diff --git a/src/settings/controllers/ThemeController.js b/src/settings/controllers/ThemeController.ts similarity index 81% rename from src/settings/controllers/ThemeController.js rename to src/settings/controllers/ThemeController.ts index 4098a5ca3e..01082a43a4 100644 --- a/src/settings/controllers/ThemeController.js +++ b/src/settings/controllers/ThemeController.ts @@ -1,6 +1,6 @@ /* -Copyright 2019 New Vector Ltd Copyright 2019 Michael Telatynski <7t3chguy@gmail.com> +Copyright 2019, 2020 The Matrix.org Foundation C.I.C. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -17,11 +17,12 @@ limitations under the License. import SettingController from "./SettingController"; import {DEFAULT_THEME, enumerateThemes} from "../../theme"; +import { SettingLevel } from "../SettingLevel"; export default class ThemeController extends SettingController { - static isLogin = false; + public static isLogin = false; - getValueOverride(level, roomId, calculatedValue, calculatedAtLevel) { + public getValueOverride(level: SettingLevel, roomId: string, calculatedValue: any, calculatedAtLevel: any): any { if (!calculatedValue) return null; // Don't override null themes if (ThemeController.isLogin) return 'light';