Skip to content

Commit

Permalink
emoji: Change fallback emojiset for text emojiset.
Browse files Browse the repository at this point in the history
Now that we have added back support for `google-blob` emojiset,
changing the fallback emojiset for `text` emojiset to `google-blob`
make sense.
  • Loading branch information
HarshitOnGitHub authored and timabbott committed Sep 22, 2018
1 parent 18a4239 commit 20aee7b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions frontend_tests/node_tests/emoji.js
Expand Up @@ -56,8 +56,8 @@ run_test('initialize', () => {
emoji.initialize();
assert(image_stub);
assert.equal(calls, 2);
assert.deepEqual(urls, ['/static/generated/emoji/sheet-google-64.png',
'/static/generated/emoji/images-google-64/1f419.png']);
assert.deepEqual(urls, ['/static/generated/emoji/sheet-google-blob-64.png',
'/static/generated/emoji/images-google-blob-64/1f419.png']);
});

run_test('get_canonical_name', () => {
Expand Down
2 changes: 1 addition & 1 deletion static/js/emoji.js
Expand Up @@ -91,7 +91,7 @@ exports.initialize = function initialize() {
// for displaying emojis in emoji picker and composebox
// typeahead. This logic ensures that we do sprite sheet
// prefetching for that case.
emojiset = 'google';
emojiset = 'google-blob';
}
// Load the sprite image and octopus image in the background, so
// that the browser will cache it for later use.
Expand Down
2 changes: 1 addition & 1 deletion zerver/tests/test_home.py
Expand Up @@ -872,5 +872,5 @@ def test_emojiset(self) -> None:
self.assertEqual(result.status_code, 200)

html = result.content.decode('utf-8')
self.assertIn('google-sprite.css', html)
self.assertIn('google-blob-sprite.css', html)
self.assertNotIn('text-sprite.css', html)
2 changes: 1 addition & 1 deletion zerver/views/home.py
Expand Up @@ -272,7 +272,7 @@ def home_real(request: HttpRequest) -> HttpResponse:
# GOOGLE_EMOJISET for picking which spritesheet's CSS to
# include (and thus how to display emojis in the emoji picker
# and composebox typeahead).
emojiset = UserProfile.GOOGLE_EMOJISET
emojiset = UserProfile.GOOGLE_BLOB_EMOJISET
response = render(request, 'zerver/app/index.html',
context={'user_profile': user_profile,
'emojiset': emojiset,
Expand Down

0 comments on commit 20aee7b

Please sign in to comment.