mirror of https://github.com/zulip/zulip.git
emoji: Export popular emojis list.
Provisions to export popular emojis list.
This commit is contained in:
parent
ff88712db8
commit
59f5af6b62
|
@ -12,6 +12,14 @@ var APPROX_WIDTH = 255;
|
|||
// implemented as the emoji_popover.
|
||||
exports.emoji_collection = {};
|
||||
exports.complete_emoji_catalog = [];
|
||||
exports.frequently_used_emojis_list = [
|
||||
'1f44d', // thumbs_up
|
||||
'1f389', // party_popper
|
||||
'1f642', // simple_smile
|
||||
'2764', // heart
|
||||
'1f6e0', // hammer_and_wrench
|
||||
'1f419', // octopus
|
||||
];
|
||||
var current_message_emoji_popover_elem;
|
||||
var emoji_catalog_last_coordinates = {
|
||||
section: 0,
|
||||
|
@ -37,17 +45,6 @@ function get_all_emoji_categories() {
|
|||
];
|
||||
}
|
||||
|
||||
function get_frequently_used_emojis() {
|
||||
return [
|
||||
'1f44d', // thumbs_up
|
||||
'1f389', // party_popper
|
||||
'1f642', // simple_smile
|
||||
'2764', // heart
|
||||
'1f6e0', // hammer_and_wrench
|
||||
'1f419', // octopus
|
||||
];
|
||||
}
|
||||
|
||||
function get_total_sections() {
|
||||
if (search_is_active) {
|
||||
return 1;
|
||||
|
@ -142,8 +139,7 @@ exports.generate_emoji_picker_data = function (realm_emojis) {
|
|||
});
|
||||
|
||||
exports.complete_emoji_catalog.Popular = [];
|
||||
var frequently_used_emojis = get_frequently_used_emojis();
|
||||
_.each(frequently_used_emojis, function (codepoint) {
|
||||
_.each(exports.frequently_used_emojis_list, function (codepoint) {
|
||||
if (emoji_codes.codepoint_to_name.hasOwnProperty(codepoint)) {
|
||||
var emoji_name = emoji_codes.codepoint_to_name[codepoint];
|
||||
if (exports.emoji_collection.hasOwnProperty(emoji_name)) {
|
||||
|
|
Loading…
Reference in New Issue