mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
This commit was originally automatically generated using `tools/lint --only=eslint --fix`. It was then modified by tabbott to contain only changes to a set of files that are unlikely to result in significant merge conflicts with any open pull request, excluding about 20 files. His plan is to merge the remaining changes with more precise care, potentially involving merging parts of conflicting pull requests before running the `eslint --fix` operation. Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
29 lines
789 B
JavaScript
29 lines
789 B
JavaScript
exports.do_unread_count_updates = function do_unread_count_updates(messages) {
|
|
unread.process_loaded_messages(messages);
|
|
unread_ui.update_unread_counts();
|
|
resize.resize_page_components();
|
|
};
|
|
|
|
function add_messages(messages, msg_list, opts) {
|
|
if (!messages) {
|
|
return;
|
|
}
|
|
|
|
loading.destroy_indicator($('#page_loading_indicator'));
|
|
$('#first_run_message').remove();
|
|
|
|
const render_info = msg_list.add_messages(messages, opts);
|
|
|
|
return render_info;
|
|
}
|
|
|
|
exports.add_old_messages = function (messages, msg_list) {
|
|
return add_messages(messages, msg_list, {messages_are_new: false});
|
|
};
|
|
exports.add_new_messages = function (messages, msg_list) {
|
|
return add_messages(messages, msg_list, {messages_are_new: true});
|
|
};
|
|
|
|
|
|
window.message_util = exports;
|