mirror of https://github.com/zulip/zulip.git
emoji: Fix caching for text emojiset.
This commit removes an early exit that was causing spritesheets to not get cached for fallback emojiset in case of text emojiset.
This commit is contained in:
parent
20aee7b116
commit
400bb6ca48
|
@ -158,18 +158,21 @@ exports.report_emojiset_change = function () {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var emojiset = page_params.emojiset;
|
||||||
|
|
||||||
if (page_params.emojiset === 'text') {
|
if (page_params.emojiset === 'text') {
|
||||||
emoji_success();
|
// For `text` emojiset we fallback to `google-blob` emojiset
|
||||||
return;
|
// for displaying emojis in emoji picker and typeahead.
|
||||||
|
emojiset = 'google-blob';
|
||||||
}
|
}
|
||||||
|
|
||||||
var sprite = new Image();
|
var sprite = new Image();
|
||||||
sprite.onload = function () {
|
sprite.onload = function () {
|
||||||
var sprite_css_href = "/static/generated/emoji/" + page_params.emojiset + "-sprite.css";
|
var sprite_css_href = "/static/generated/emoji/" + emojiset + "-sprite.css";
|
||||||
$("#emoji-spritesheet").attr('href', sprite_css_href);
|
$("#emoji-spritesheet").attr('href', sprite_css_href);
|
||||||
emoji_success();
|
emoji_success();
|
||||||
};
|
};
|
||||||
sprite.src = "/static/generated/emoji/sheet-" + page_params.emojiset + "-64.png";
|
sprite.src = "/static/generated/emoji/sheet-" + emojiset + "-64.png";
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.update_page = function () {
|
exports.update_page = function () {
|
||||||
|
|
Loading…
Reference in New Issue