mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
emoji: Pre-fetch octopus emoji in emoji.js.
If we don't prefetch the image then on slow networks it will appear as if octopus emoji is not present.
This commit is contained in:
committed by
Tim Abbott
parent
7be7561c68
commit
3e5e7a0b19
@@ -93,10 +93,12 @@ exports.initialize = function initialize() {
|
|||||||
// prefetching for that case.
|
// prefetching for that case.
|
||||||
emojiset = 'google';
|
emojiset = 'google';
|
||||||
}
|
}
|
||||||
// Load the sprite image in the background so that the browser
|
// Load the sprite image and octopus image in the background, so
|
||||||
// can cache it for later use.
|
// that the browser will cache it for later use.
|
||||||
var sprite = new Image();
|
var sprite = new Image();
|
||||||
sprite.src = '/static/generated/emoji/sheet_' + emojiset + '_64.png';
|
sprite.src = '/static/generated/emoji/sheet_' + emojiset + '_64.png';
|
||||||
|
var octopus_image = new Image();
|
||||||
|
octopus_image.src = '/static/generated/emoji/images-' + emojiset + '-64/1f419.png';
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.build_emoji_data = function (realm_emojis) {
|
exports.build_emoji_data = function (realm_emojis) {
|
||||||
|
|||||||
Reference in New Issue
Block a user