mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	typeahead: Rename codepoint to emoji_code.
				
					
				
			This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							4251543426
						
					
				
				
					commit
					f8f971bfd6
				
			@@ -73,7 +73,7 @@ exports.initialize = function initialize() {
 | 
			
		||||
    _.each(emoji_codes.names, function (value) {
 | 
			
		||||
        var base_name = emoji_codes.name_to_codepoint[value];
 | 
			
		||||
        default_emojis.push({emoji_name: value,
 | 
			
		||||
                             codepoint: emoji_codes.name_to_codepoint[value]});
 | 
			
		||||
                             emoji_code: emoji_codes.name_to_codepoint[value]});
 | 
			
		||||
 | 
			
		||||
        if (exports.default_emoji_aliases.hasOwnProperty(base_name)) {
 | 
			
		||||
            exports.default_emoji_aliases[base_name].push(value);
 | 
			
		||||
 
 | 
			
		||||
@@ -156,7 +156,7 @@ exports.render_emoji = function (item) {
 | 
			
		||||
    if (emoji.active_realm_emojis.hasOwnProperty(item.emoji_name)) {
 | 
			
		||||
        args.img_src = item.emoji_url;
 | 
			
		||||
    } else {
 | 
			
		||||
        args.codepoint = item.codepoint;
 | 
			
		||||
        args.emoji_code = item.emoji_code;
 | 
			
		||||
    }
 | 
			
		||||
    return exports.render_typeahead_item(args);
 | 
			
		||||
};
 | 
			
		||||
@@ -168,7 +168,7 @@ function emoji_prefix_sort(query, objs, get_item) {
 | 
			
		||||
    var popular_emoji_matches = [];
 | 
			
		||||
    var other_emoji_matches = [];
 | 
			
		||||
    prefix_sort.matches.forEach(function (obj) {
 | 
			
		||||
        if (emoji.frequently_used_emojis_list.indexOf(obj.codepoint) !== -1) {
 | 
			
		||||
        if (emoji.frequently_used_emojis_list.indexOf(obj.emoji_code) !== -1) {
 | 
			
		||||
            popular_emoji_matches.push(obj);
 | 
			
		||||
        } else {
 | 
			
		||||
            other_emoji_matches.push(obj);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user