mirror of
https://github.com/zulip/zulip.git
synced 2025-11-17 20:41:46 +00:00
refactor: Call compose_fade without triggers.
We are trying to phase out the trigger-event way
of telling modules to do something.
In this case we not only remove the indirection
of the event handler, but we also get to remove
`compose_fade` from the `ui_init` startup sequence.
This also has us update `compose_fade` outside
the loop, although that's only a theoretical
improvement, since I don't think `peer_add` events
every actually include multiple streams.
To make the dispatch tests a little flatter, I
added a one-line change to zjsunit to add
`make_stub` to `global`.
To manually test:
* have Aaron reply to Denmark (keep compose box open)
* have Iago add Hamlet to Denmark
* have Hamlet unsubscribe
This commit is contained in:
@@ -239,11 +239,4 @@ exports.update_rendered_message_groups = function (message_groups, get_element)
|
||||
}
|
||||
};
|
||||
|
||||
exports.initialize = function () {
|
||||
$(document).on('peer_subscribe.zulip peer_unsubscribe.zulip', function () {
|
||||
exports.update_faded_users();
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
window.compose_fade = exports;
|
||||
|
||||
Reference in New Issue
Block a user