summaryrefslogtreecommitdiffstats
path: root/web/react/utils/utils.jsx
diff options
context:
space:
mode:
authorReed Garmsen <rgarmsen2295@gmail.com>2015-11-04 13:49:39 -0800
committerReed Garmsen <rgarmsen2295@gmail.com>2015-11-04 14:58:21 -0800
commit4897997025d07998e77cee4dd1c4252fff763db4 (patch)
tree17d1edb33f34e335222d6b52a7249d8a165f7d2e /web/react/utils/utils.jsx
parent0054924cdbcdb3e3631bd7036244aebba4234c33 (diff)
downloadchat-4897997025d07998e77cee4dd1c4252fff763db4.tar.gz
chat-4897997025d07998e77cee4dd1c4252fff763db4.tar.bz2
chat-4897997025d07998e77cee4dd1c4252fff763db4.zip
Removed old code theme selector and fixed some issues
Diffstat (limited to 'web/react/utils/utils.jsx')
-rw-r--r--web/react/utils/utils.jsx10
1 files changed, 5 insertions, 5 deletions
diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx
index e8d34dccd..770ab01c5 100644
--- a/web/react/utils/utils.jsx
+++ b/web/react/utils/utils.jsx
@@ -438,11 +438,6 @@ export function toTitleCase(str) {
}
export function applyTheme(theme) {
- if (!theme.codeTheme) {
- theme.codeTheme = Constants.DEFAULT_CODE_THEME;
- }
- updateCodeTheme(theme.codeTheme);
-
if (theme.sidebarBg) {
changeCss('.sidebar--left, .settings-modal .settings-table .settings-links, .sidebar--menu', 'background:' + theme.sidebarBg, 1);
}
@@ -598,6 +593,11 @@ export function applyTheme(theme) {
if (theme.mentionHighlightLink) {
changeCss('.mention-highlight .mention-link', 'color:' + theme.mentionHighlightLink, 1);
}
+
+ if (!theme.codeTheme) {
+ theme.codeTheme = Constants.DEFAULT_CODE_THEME;
+ }
+ updateCodeTheme(theme.codeTheme);
}
export function changeCss(className, classValue, classRepeat) {
// we need invisible container to store additional css definitions