Single emoji rendering fixes.

* Make the emoji a little bit smaller
* Avoid scrollbar appearing for single emoji messages
* Also identify single sent emojis
This commit is contained in:
JC Brand 2019-03-31 20:27:23 +02:00
parent 21ca33ec29
commit 77241bf5fe
4 changed files with 7 additions and 5 deletions

View File

@ -11963,8 +11963,9 @@ body.converse-fullscreen {
#conversejs .message.chat-msg .chat-msg__text .emojione {
margin-bottom: -6px; }
#conversejs .message.chat-msg .chat-msg__text--larger {
font-size: 2em;
padding-top: 0.25em; }
font-size: 1.6em;
padding-top: 0.25em;
padding-bottom: 0.25em; }
#conversejs .message.chat-msg .chat-msg__media {
margin-top: 0.25rem;
word-break: break-all; }

2
dist/converse.js vendored
View File

@ -92319,7 +92319,7 @@ function convert(unicode) {
}
_core__WEBPACK_IMPORTED_MODULE_2__["default"].isSingleEmoji = function (str) {
if (!str || str.length > 2) {
if (!str || str.length > 2 && !str.startsWith(':')) {
return;
}

View File

@ -178,8 +178,9 @@
}
.chat-msg__text--larger {
font-size: 2em;
font-size: 1.6em;
padding-top: 0.25em;
padding-bottom: 0.25em;
}
.chat-msg__media {

View File

@ -161,7 +161,7 @@ function convert (unicode) {
}
u.isSingleEmoji = function (str) {
if (!str || str.length > 2) {
if (!str || (str.length > 2 && !str.startsWith(':'))) {
return;
}
const result = _.flow(u.shortnameToUnicode, twemoji.default.parse)(str)