[FIX] Apply emojify on empty texts (#824)
This commit is contained in:
parent
fde8aea173
commit
fb88d08f88
|
@ -28,7 +28,9 @@ export default class Markdown extends React.Component {
|
|||
return null;
|
||||
}
|
||||
let m = formatText(msg);
|
||||
if (m) {
|
||||
m = emojify(m, { output: 'unicode' });
|
||||
}
|
||||
m = m.replace(/^\[([^\]]*)\]\(([^)]*)\)/, '').trim();
|
||||
return (
|
||||
<MarkdownRenderer
|
||||
|
|
|
@ -97,7 +97,7 @@ const Reply = ({
|
|||
};
|
||||
|
||||
const renderTitle = () => {
|
||||
if (!(attachment.author_icon || attachment.author_name || attachment.ts)) {
|
||||
if (!attachment.author_name) {
|
||||
return null;
|
||||
}
|
||||
return (
|
||||
|
|
|
@ -123,7 +123,9 @@ export class List extends React.PureComponent {
|
|||
const thread = threads.find(t => t._id === item.tmid);
|
||||
if (thread) {
|
||||
let tmsg = thread.msg || (thread.attachments && thread.attachments.length && thread.attachments[0].title);
|
||||
if (tmsg) {
|
||||
tmsg = emojify(tmsg, { output: 'unicode' });
|
||||
}
|
||||
item = { ...item, tmsg };
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue