From 50a44405f012f9f987709025d1ea4c0e1e275eac Mon Sep 17 00:00:00 2001 From: Jorik Schellekens Date: Wed, 20 May 2020 15:17:47 +0100 Subject: [PATCH] CONSTANT_CASING --- src/FontWatcher.js | 6 +++--- .../views/settings/tabs/user/AppearanceUserSettingsTab.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/FontWatcher.js b/src/FontWatcher.js index c547ef8ce0..006df202ad 100644 --- a/src/FontWatcher.js +++ b/src/FontWatcher.js @@ -18,8 +18,8 @@ import dis from './dispatcher/dispatcher'; import SettingsStore, {SettingLevel} from './settings/SettingsStore'; export class FontWatcher { - static minSize = 13; - static maxSize = 20; + static MIN_SIZE = 13; + static MAX_SIZE = 20; constructor() { this._dispatcherRef = null; @@ -41,7 +41,7 @@ export class FontWatcher { }; _setRootFontSize = (size) => { - const fontSize = Math.max(Math.min(FontWatcher.maxSize, size), FontWatcher.minSize); + const fontSize = Math.max(Math.min(FontWatcher.MAX_SIZE, size), FontWatcher.MIN_SIZE); 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 3d04e10df7..5b49dd0abd 100644 --- a/src/components/views/settings/tabs/user/AppearanceUserSettingsTab.js +++ b/src/components/views/settings/tabs/user/AppearanceUserSettingsTab.js @@ -109,8 +109,8 @@ export default class AppearanceUserSettingsTab extends React.Component { console.log({value}); const parsedSize = parseFloat(value); - const min = FontWatcher.minSize; - const max = FontWatcher.maxSize; + const min = FontWatcher.MIN_SIZE; + const max = FontWatcher.MAX_SIZE; if (isNaN(parsedSize)) { return {valid: false, feedback: _t("Size must be a number")};