Move initial call to get_events to server_events.home_view_loaded.

Note that this makes the event fire after the home view has messages
loaded all the way to current; previously it only waited for the first
batch of messages to load.

(imported from commit a5c408ea0136c761f4cc77e8be4977b13acc6d77)
This commit is contained in:
Tim Abbott
2014-01-30 14:32:13 -05:00
parent 1eb294ed11
commit f27edcd50a
2 changed files with 3 additions and 11 deletions

View File

@@ -244,11 +244,8 @@ exports.force_get_events = function force_get_events() {
};
exports.home_view_loaded = function home_view_loaded() {
if (!waiting_on_homeview_load) {
return;
}
waiting_on_homeview_load = false;
exports.get_events();
$(document).trigger("home_view_loaded.zulip");
};