fix observer

pull/7748/head
Guilherme Gazzo 9 years ago
parent a06c861c58
commit bbd9d85646
  1. 2
      packages/rocketchat-ui-master/client/main.js
  2. 1
      packages/rocketchat-ui-master/server/dynamic-css.js

@ -1,7 +1,7 @@
/* globals toolbarSearch, menu, isRtl, fireGlobalEvent, CachedChatSubscription */
import Clipboard from 'clipboard';
RocketChat.settings.collection.find({_id:/theme/}, {fields:{ value: 1 }}).observe({changed: (key) => { console.log(key); }});
RocketChat.settings.collection.find({_id:/theme/}, {fields:{ value: 1 }}).observe({changed: () => { DynamicCss.run(); }});
Template.body.onRendered(function() {
new Clipboard('.clipboard');

@ -16,6 +16,7 @@ export default () => {
const style = document.createElement('style');
style.type = 'text/css';
style.id = 'rocketchat-dynamic-css';
DynamicCss = typeof DynamicCss !=='undefined'? DynamicCss : {list:[]};

Loading…
Cancel
Save