mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 20:44:04 +00:00
refactor: Have emoji_picker pull from emoji.
This makes it so that the authoritative holder of all emoji data is emoji.js, and all our UI components that need emoji data consistently pull data from emoji.js as needed. Or to put it another way, we no longer need the dispatch module to know that emoji_picker is coupled to emoji precisely by the active_realm_emojis data; it can now make fewer assumptions.
This commit is contained in:
@@ -98,7 +98,9 @@ function show_emoji_catalog() {
|
||||
search_is_active = false;
|
||||
}
|
||||
|
||||
exports.rebuild_catalog = function (realm_emojis) {
|
||||
exports.rebuild_catalog = function () {
|
||||
const realm_emojis = emoji.active_realm_emojis;
|
||||
|
||||
const catalog = new Map();
|
||||
catalog.set(
|
||||
"Custom",
|
||||
@@ -771,7 +773,7 @@ exports.register_click_handlers = function () {
|
||||
};
|
||||
|
||||
exports.initialize = function () {
|
||||
exports.rebuild_catalog(emoji.active_realm_emojis);
|
||||
exports.rebuild_catalog();
|
||||
};
|
||||
|
||||
window.emoji_picker = exports;
|
||||
|
||||
Reference in New Issue
Block a user