mirror of
https://github.com/zulip/zulip.git
synced 2025-11-15 11:22:04 +00:00
message_store: Move initialization to ui_init.js.
This commit is contained in:
@@ -62,6 +62,7 @@ people.add_in_realm(cindy);
|
|||||||
global.people.initialize_current_user(me.user_id);
|
global.people.initialize_current_user(me.user_id);
|
||||||
|
|
||||||
var message_store = require('js/message_store.js');
|
var message_store = require('js/message_store.js');
|
||||||
|
message_store.initialize();
|
||||||
|
|
||||||
(function test_insert_recent_private_message() {
|
(function test_insert_recent_private_message() {
|
||||||
message_store.insert_recent_private_message('1', 1001);
|
message_store.insert_recent_private_message('1', 1001);
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ exports.add_message_metadata = function (message) {
|
|||||||
return message;
|
return message;
|
||||||
};
|
};
|
||||||
|
|
||||||
util.execute_early(function () {
|
exports.initialize = function () {
|
||||||
$(document).on('message_id_changed', function (event) {
|
$(document).on('message_id_changed', function (event) {
|
||||||
var old_id = event.old_id;
|
var old_id = event.old_id;
|
||||||
var new_id = event.new_id;
|
var new_id = event.new_id;
|
||||||
@@ -204,7 +204,7 @@ util.execute_early(function () {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
};
|
||||||
|
|
||||||
return exports;
|
return exports;
|
||||||
|
|
||||||
|
|||||||
@@ -246,6 +246,7 @@ $(function () {
|
|||||||
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();
|
||||||
|
message_store.initialize();
|
||||||
markdown.initialize();
|
markdown.initialize();
|
||||||
composebox_typeahead.initialize();
|
composebox_typeahead.initialize();
|
||||||
search.initialize();
|
search.initialize();
|
||||||
|
|||||||
Reference in New Issue
Block a user