mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	This commit prepares the frontend code to be consumed by webpack. It is a hack: In theory, modules should be declaring and importing the modules they depend on and the globals they expose directly. However, that requires significant per-module work, which we don't really want to block moving our toolchain to webpack on. So we expose the modules by setting window.varName = varName; as needed in the js files.
		
			
				
	
	
		
			32 lines
		
	
	
		
			711 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			711 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
var message_util = (function () {
 | 
						|
 | 
						|
var exports = {};
 | 
						|
 | 
						|
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();
 | 
						|
};
 | 
						|
 | 
						|
exports.add_messages = function add_messages(messages, msg_list, opts) {
 | 
						|
    if (!messages) {
 | 
						|
        return;
 | 
						|
    }
 | 
						|
 | 
						|
    opts = _.extend({messages_are_new: false}, opts);
 | 
						|
 | 
						|
    loading.destroy_indicator($('#page_loading_indicator'));
 | 
						|
    $('#first_run_message').remove();
 | 
						|
 | 
						|
    msg_list.add_messages(messages, opts);
 | 
						|
};
 | 
						|
 | 
						|
 | 
						|
return exports;
 | 
						|
 | 
						|
}());
 | 
						|
if (typeof module !== 'undefined') {
 | 
						|
    module.exports = message_util;
 | 
						|
}
 | 
						|
window.message_util = message_util;
 |