mirror of https://github.com/zulip/zulip.git
minor: Remove parameter to populate_emoji.
This is an easy prep step to help out phase out page_params.realm_emoji. All callers pass in what's effectively page_params.realm_emoji. (The dispatch code does it indirectly.)
This commit is contained in:
parent
4f195de78d
commit
d11c6686a1
|
@ -218,7 +218,7 @@ exports.dispatch_normal_event = function dispatch_normal_event(event) {
|
|||
// can display it properly when reopened without refresh.
|
||||
page_params.realm_emoji = event.realm_emoji;
|
||||
emoji.update_emojis(event.realm_emoji);
|
||||
settings_emoji.populate_emoji(event.realm_emoji);
|
||||
settings_emoji.populate_emoji();
|
||||
emoji_picker.generate_emoji_picker_data(emoji.active_realm_emojis);
|
||||
composebox_typeahead.update_emoji_data();
|
||||
break;
|
||||
|
|
|
@ -45,7 +45,7 @@ exports.update_custom_emoji_ui = function () {
|
|||
$(".admin-emoji-form").show();
|
||||
}
|
||||
|
||||
exports.populate_emoji(page_params.realm_emoji);
|
||||
exports.populate_emoji();
|
||||
};
|
||||
|
||||
exports.reset = function () {
|
||||
|
@ -61,11 +61,13 @@ function sort_author_full_name(a, b) {
|
|||
return -1;
|
||||
}
|
||||
|
||||
exports.populate_emoji = function (emoji_data) {
|
||||
exports.populate_emoji = function () {
|
||||
if (!meta.loaded) {
|
||||
return;
|
||||
}
|
||||
|
||||
const emoji_data = page_params.realm_emoji;
|
||||
|
||||
for (const emoji of Object.values(emoji_data)) {
|
||||
// Add people.js data for the user here.
|
||||
if (emoji.author_id !== null) {
|
||||
|
@ -141,7 +143,7 @@ exports.set_up = function () {
|
|||
loading.make_indicator($("#admin_page_emoji_loading_indicator"));
|
||||
|
||||
// Populate emoji table
|
||||
exports.populate_emoji(page_params.realm_emoji);
|
||||
exports.populate_emoji();
|
||||
|
||||
$(".admin_emoji_table").on("click", ".delete", function (e) {
|
||||
e.preventDefault();
|
||||
|
|
Loading…
Reference in New Issue