Skip to content
This repository was archived by the owner on Mar 6, 2020. It is now read-only.

Commit 097765f

Browse files
author
René Kooi
committed
chat-type: fix emoji badges
1 parent c3b0ced commit 097765f

2 files changed

Lines changed: 13 additions & 10 deletions

File tree

src/plugins/ChatTypePlugin.js

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@ define(function (require, exports, module) {
2828
* won't expect to find more than one type.
2929
*/
3030
const ChatTypePlugin = Plugin.extend({
31+
style: {
32+
'.badge-box .emoji-outer': {
33+
'margin': '7px'
34+
},
35+
'.inline .badge-box .emoji-outer': {
36+
'margin': '0 7px'
37+
}
38+
},
39+
3140
enable() {
3241
// chatView.onReceived will still be the old method after adding advice
3342
// so the event listener should also be swapped out
@@ -72,11 +81,10 @@ define(function (require, exports, module) {
7281
let emojiName = message.badge.slice(1, -1);
7382
if (emoji.map.colons[emojiName]) {
7483
badgeBox.find('i').remove();
75-
badgeBox.append(
76-
$('<span />').addClass('emoji-glow extplug-badji').append(
77-
$('<span />').addClass('emoji emoji-' + emoji.map.colons[emojiName])
78-
)
79-
);
84+
badgeBox
85+
.append(emoji.replace_colons(message.badge))
86+
// compatibility class
87+
.find('.emoji-outer').addClass('extplug-badji');
8088
}
8189
}
8290
// icon badge

src/styles/inline-chat.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@ define({
2121
'.bdg': {
2222
'top': '-7px',
2323
'transform': 'scale(0.5)'
24-
},
25-
26-
// emoji badges
27-
'.extplug-badji': {
28-
'left': '7px'
2924
}
3025
},
3126
'.from': { 'display': 'inline' },

0 commit comments

Comments
 (0)