From 4d6ca1ab705ebcca54a76745442e6f72ccaf2126 Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Wed, 24 May 2017 13:30:32 -0700 Subject: [PATCH] Introduce compose_fade.initialize(). --- static/js/compose_fade.js | 4 ++-- static/js/ui_init.js | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/static/js/compose_fade.js b/static/js/compose_fade.js index 317d14e885..abddb4f130 100644 --- a/static/js/compose_fade.js +++ b/static/js/compose_fade.js @@ -256,14 +256,14 @@ exports.update_rendered_message_groups = function (message_groups, get_element) }); }; -$(function () { +exports.initialize = function () { $(document).on('peer_subscribe.zulip', function () { exports.update_faded_users(); }); $(document).on('peer_unsubscribe.zulip', function () { exports.update_faded_users(); }); -}); +}; return exports; diff --git a/static/js/ui_init.js b/static/js/ui_init.js index c71030989f..c3c63cf3b9 100644 --- a/static/js/ui_init.js +++ b/static/js/ui_init.js @@ -255,6 +255,7 @@ $(function () { activity.initialize(); emoji.initialize(); hotspots.initialize(); + compose_fade.initialize(); });