Skip to content

Commit

Permalink
Merge pull request #6923 from RocketChat/hotfix/rc-electron-unread-badge
Browse files Browse the repository at this point in the history
[FIX] Not showing unread count on electron app’s icon
  • Loading branch information
engelgabriel authored May 9, 2017
2 parents 2f682aa + d83f2d9 commit 48efadb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/rocketchat-ui/client/lib/fireEvent.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
window.fireGlobalEvent = function _fireGlobalEvent(eventName, params) {
window.dispatchEvent(new CustomEvent(eventName, {detail: params}));

Tracker.autorun((computation) => {
const enabled = RocketChat.settings.get('Iframe_Integration_send_enable');
if (enabled === undefined) {
return;
}
computation.stop();
if (enabled) {
window.dispatchEvent(new CustomEvent(eventName, {detail: params}));
parent.postMessage({
eventName,
data: params
}, RocketChat.settings.get('Iframe_Integration_send_target_origin'));
}
});
};

0 comments on commit 48efadb

Please sign in to comment.