From 15075e4c10a08e19d17bdec6420b93c10a108a5a Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 16 Apr 2020 10:36:19 +0200 Subject: [PATCH] load twemoji in matrixclient rather than loggedinview --- src/components/structures/LoggedInView.tsx | 3 --- src/components/structures/MatrixChat.js | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/structures/LoggedInView.tsx b/src/components/structures/LoggedInView.tsx index 9de2aac8e9..f90ae18f00 100644 --- a/src/components/structures/LoggedInView.tsx +++ b/src/components/structures/LoggedInView.tsx @@ -25,7 +25,6 @@ import { DragDropContext } from 'react-beautiful-dnd'; import {Key, isOnlyCtrlOrCmdKeyEvent, isOnlyCtrlOrCmdIgnoreShiftKeyEvent} from '../../Keyboard'; import PageTypes from '../../PageTypes'; import CallMediaHandler from '../../CallMediaHandler'; -import { fixupColorFonts } from '../../utils/FontManager'; import * as sdk from '../../index'; import dis from '../../dispatcher'; import sessionStore from '../../stores/SessionStore'; @@ -166,8 +165,6 @@ class LoggedInView extends React.PureComponent { this._matrixClient.on("sync", this.onSync); this._matrixClient.on("RoomState.events", this.onRoomStateEvents); - fixupColorFonts(); - this._roomView = React.createRef(); this._resizeContainer = React.createRef(); } diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index 519b39d436..4b269ceae4 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -66,6 +66,7 @@ import { storeRoomAliasInCache } from '../../RoomAliasCache'; import { defer } from "../../utils/promise"; import ToastStore from "../../stores/ToastStore"; import * as StorageManager from "../../utils/StorageManager"; +import { fixupColorFonts } from '../../utils/FontManager'; /** constants for MatrixChat.state.view */ export const VIEWS = { @@ -244,6 +245,8 @@ export default createReactClass({ this._pageChanging = false; + // load emoji font + fixupColorFonts(); // check we have the right tint applied for this theme. // N.B. we don't call the whole of setTheme() here as we may be // racing with the theme CSS download finishing from index.js