mirror of https://github.com/zulip/zulip.git
electron_bridge: Notify electron app when org avatar is updated.
This commit is contained in:
parent
93f732406d
commit
f0190fe0b8
|
@ -1,6 +1,7 @@
|
|||
var noop = function () {};
|
||||
|
||||
set_global('document', 'document-stub');
|
||||
set_global('window', {});
|
||||
set_global('$', function () {
|
||||
return {
|
||||
trigger: noop,
|
||||
|
|
|
@ -105,6 +105,11 @@ exports.dispatch_normal_event = function dispatch_normal_event(event) {
|
|||
page_params.realm_icon_url = event.data.icon_url;
|
||||
page_params.realm_icon_source = event.data.icon_source;
|
||||
realm_icon.rerender();
|
||||
|
||||
var electron_bridge = window.electron_bridge;
|
||||
if (electron_bridge !== undefined) {
|
||||
electron_bridge.send_event('realm_icon_url', event.data.icon_url);
|
||||
}
|
||||
} else if (event.op === 'deactivated') {
|
||||
window.location.href = "/accounts/deactivated/";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue