mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 21:43:21 +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.
|
||||
emojiset = 'google';
|
||||
}
|
||||
// Load the sprite image in the background so that the browser
|
||||
// can cache it for later use.
|
||||
// Load the sprite image and octopus image in the background, so
|
||||
// that the browser will cache it for later use.
|
||||
var sprite = new Image();
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user