Commit 77241bf5 authored by JC Brand's avatar JC Brand

Single emoji rendering fixes.

* Make the emoji a little bit smaller
* Avoid scrollbar appearing for single emoji messages
* Also identify single sent emojis
parent 21ca33ec
...@@ -11963,8 +11963,9 @@ body.converse-fullscreen { ...@@ -11963,8 +11963,9 @@ body.converse-fullscreen {
#conversejs .message.chat-msg .chat-msg__text .emojione { #conversejs .message.chat-msg .chat-msg__text .emojione {
margin-bottom: -6px; } margin-bottom: -6px; }
#conversejs .message.chat-msg .chat-msg__text--larger { #conversejs .message.chat-msg .chat-msg__text--larger {
font-size: 2em; font-size: 1.6em;
padding-top: 0.25em; } padding-top: 0.25em;
padding-bottom: 0.25em; }
#conversejs .message.chat-msg .chat-msg__media { #conversejs .message.chat-msg .chat-msg__media {
margin-top: 0.25rem; margin-top: 0.25rem;
word-break: break-all; } word-break: break-all; }
......
...@@ -92319,7 +92319,7 @@ function convert(unicode) { ...@@ -92319,7 +92319,7 @@ function convert(unicode) {
} }
_core__WEBPACK_IMPORTED_MODULE_2__["default"].isSingleEmoji = function (str) { _core__WEBPACK_IMPORTED_MODULE_2__["default"].isSingleEmoji = function (str) {
if (!str || str.length > 2) { if (!str || str.length > 2 && !str.startsWith(':')) {
return; return;
} }
...@@ -178,8 +178,9 @@ ...@@ -178,8 +178,9 @@
} }
.chat-msg__text--larger { .chat-msg__text--larger {
font-size: 2em; font-size: 1.6em;
padding-top: 0.25em; padding-top: 0.25em;
padding-bottom: 0.25em;
} }
.chat-msg__media { .chat-msg__media {
......
...@@ -161,7 +161,7 @@ function convert (unicode) { ...@@ -161,7 +161,7 @@ function convert (unicode) {
} }
u.isSingleEmoji = function (str) { u.isSingleEmoji = function (str) {
if (!str || str.length > 2) { if (!str || (str.length > 2 && !str.startsWith(':'))) {
return; return;
} }
const result = _.flow(u.shortnameToUnicode, twemoji.default.parse)(str) const result = _.flow(u.shortnameToUnicode, twemoji.default.parse)(str)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment