mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 15:33:30 +00:00
Move several initialization calls to after we've set up event handlers.
This will matter shortly as hashchange.initialize can call narrow.activate(), which fires an event handler. Really, I have no idea why we have these initialize() methods anyway and we don't just do initialization on document.ready. (imported from commit 3a6a80e1426b03439b95cae3f142a4b1c43125e9)
This commit is contained in:
@@ -833,16 +833,6 @@ $(function () {
|
||||
resizehandler();
|
||||
hack_for_floating_recipient_bar();
|
||||
|
||||
typeahead_helper.update_all_recipients(page_params.people_list);
|
||||
composebox_typeahead.initialize();
|
||||
search.initialize();
|
||||
notifications.initialize();
|
||||
hashchange.initialize();
|
||||
invite.initialize();
|
||||
activity.initialize();
|
||||
subs.maybe_toggle_all_messages();
|
||||
tutorial.initialize();
|
||||
|
||||
$("#main_div").on("click", ".messagebox", function (e) {
|
||||
var target = $(e.target);
|
||||
if (target.is("a") || target.is("img.message_inline_image") || target.is("img.twitter-avatar") ||
|
||||
@@ -1125,6 +1115,16 @@ $(function () {
|
||||
}
|
||||
});
|
||||
|
||||
// initialize other stuff
|
||||
typeahead_helper.update_all_recipients(page_params.people_list);
|
||||
composebox_typeahead.initialize();
|
||||
search.initialize();
|
||||
notifications.initialize();
|
||||
hashchange.initialize();
|
||||
invite.initialize();
|
||||
activity.initialize();
|
||||
subs.maybe_toggle_all_messages();
|
||||
tutorial.initialize();
|
||||
});
|
||||
|
||||
exports.sort_narrow_list = function () {
|
||||
|
||||
Reference in New Issue
Block a user