From 82b76192aee6fe64865c1bc4ff456d0c4614dad0 Mon Sep 17 00:00:00 2001 From: Jorik Schellekens Date: Wed, 20 May 2020 14:44:56 +0100 Subject: [PATCH] Fixes, lints and i18n --- src/FontWatcher.js | 4 ++-- .../views/settings/tabs/user/AppearanceUserSettingsTab.js | 2 +- src/i18n/strings/en_EN.json | 2 -- src/settings/controllers/FontSizeController.js | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/FontWatcher.js b/src/FontWatcher.js index 1128ac1bd5..b45d9065ce 100644 --- a/src/FontWatcher.js +++ b/src/FontWatcher.js @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import dis from './dispatcher'; +import dis from './dispatcher/dispatcher'; import SettingsStore, {SettingLevel} from './settings/SettingsStore'; export class FontWatcher { @@ -42,7 +42,7 @@ export class FontWatcher { }; _setRootFontSize = (size) => { - const fontSize = Math.max(Math.min(this.maxSize, size), this.minSize); + const fontSize = Math.max(Math.min(FontWatcher.maxSize, size), FontWatcher.minSize); if (fontSize != size) { SettingsStore.setValue("fontSize", null, SettingLevel.Device, fontSize); diff --git a/src/components/views/settings/tabs/user/AppearanceUserSettingsTab.js b/src/components/views/settings/tabs/user/AppearanceUserSettingsTab.js index 308b7098d1..3d04e10df7 100644 --- a/src/components/views/settings/tabs/user/AppearanceUserSettingsTab.js +++ b/src/components/views/settings/tabs/user/AppearanceUserSettingsTab.js @@ -24,7 +24,7 @@ import {enumerateThemes, ThemeWatcher} from "../../../../../theme"; import Field from "../../../elements/Field"; import Slider from "../../../elements/Slider"; import AccessibleButton from "../../../elements/AccessibleButton"; -import dis from "../../../../../dispatcher"; +import dis from "../../../../../dispatcher/dispatcher"; import { FontWatcher } from "../../../../../FontWatcher"; export default class AppearanceUserSettingsTab extends React.Component { diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index d6670e85b3..b7417762f1 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -412,8 +412,6 @@ "Enable cross-signing to verify per-user instead of per-session": "Enable cross-signing to verify per-user instead of per-session", "Show info about bridges in room settings": "Show info about bridges in room settings", "Font size": "Font size", - "Min font size": "Min font size", - "Max font size": "Max font size", "Custom font size": "Custom font size", "Enable Emoji suggestions while typing": "Enable Emoji suggestions while typing", "Use compact timeline layout": "Use compact timeline layout", diff --git a/src/settings/controllers/FontSizeController.js b/src/settings/controllers/FontSizeController.js index 8e855e31ec..3ef01ab99b 100644 --- a/src/settings/controllers/FontSizeController.js +++ b/src/settings/controllers/FontSizeController.js @@ -15,7 +15,7 @@ limitations under the License. */ import SettingController from "./SettingController"; -import dis from "../../dispatcher"; +import dis from "../../dispatcher/dispatcher"; export default class FontSizeController extends SettingController { constructor() {