mirror of https://github.com/zulip/zulip.git
server_events: Move initialization to ui_init.js.
This commit is contained in:
parent
e33b178054
commit
effd7ef41f
|
@ -261,7 +261,7 @@ exports.check_for_unsuspend = function () {
|
||||||
};
|
};
|
||||||
setInterval(exports.check_for_unsuspend, 5000);
|
setInterval(exports.check_for_unsuspend, 5000);
|
||||||
|
|
||||||
util.execute_early(function () {
|
exports.initialize = function () {
|
||||||
$(document).on('unsuspend', function () {
|
$(document).on('unsuspend', function () {
|
||||||
// Immediately poll for new events on unsuspend
|
// Immediately poll for new events on unsuspend
|
||||||
blueslip.log("Restarting get_events due to unsuspend");
|
blueslip.log("Restarting get_events due to unsuspend");
|
||||||
|
@ -269,7 +269,7 @@ util.execute_early(function () {
|
||||||
exports.restart_get_events({dont_block: true});
|
exports.restart_get_events({dont_block: true});
|
||||||
});
|
});
|
||||||
get_events();
|
get_events();
|
||||||
});
|
};
|
||||||
|
|
||||||
exports.cleanup_event_queue = function cleanup_event_queue() {
|
exports.cleanup_event_queue = function cleanup_event_queue() {
|
||||||
// Submit a request to the server to cleanup our event queue
|
// Submit a request to the server to cleanup our event queue
|
||||||
|
|
|
@ -243,6 +243,7 @@ $(function () {
|
||||||
|
|
||||||
// initialize other stuff
|
// initialize other stuff
|
||||||
reload.initialize();
|
reload.initialize();
|
||||||
|
server_events.initialize();
|
||||||
people.initialize();
|
people.initialize();
|
||||||
bot_data.initialize(); // Must happen after people.initialize()
|
bot_data.initialize(); // Must happen after people.initialize()
|
||||||
message_fetch.initialize();
|
message_fetch.initialize();
|
||||||
|
|
Loading…
Reference in New Issue