More code review suggestions.
This commit is contained in:
@@ -843,16 +843,17 @@ class MessagesView extends React.Component {
|
||||
uploader.cancel();
|
||||
}
|
||||
|
||||
handlePickReply(seq, content, senderId, senderName) {
|
||||
handlePickReply(seq, content, forwarded, senderId, senderName) {
|
||||
this.setState({reply: null});
|
||||
|
||||
if (!seq || !content) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (typeof content == 'string') {
|
||||
content = Drafty.init(content);
|
||||
}
|
||||
content = forwarded ?
|
||||
Drafty.forwardedContent(content) :
|
||||
typeof content == 'string' ?
|
||||
Drafty.init(content) : content;
|
||||
if (Drafty.isValid(content)) {
|
||||
content = Drafty.preview(content, QUOTED_REPLY_LENGTH);
|
||||
} else {
|
||||
|
||||
@@ -1450,8 +1450,12 @@ class TinodeWeb extends React.Component {
|
||||
// If the Find panel is active, close it.
|
||||
this.handleSidepanelCancel();
|
||||
}
|
||||
const header = params.userName;
|
||||
const content = typeof params.content == 'string' ? Tinode.Drafty.init(params.content) : params.content;
|
||||
const header = '➦ ' + params.userName;
|
||||
const content = params.forwarded ?
|
||||
Tinode.Drafty.forwardedContent(params.content) :
|
||||
typeof params.content == 'string' ?
|
||||
Tinode.Drafty.init(params.content) : params.content;
|
||||
//const content = typeof params.content == 'string' ? Tinode.Drafty.init(params.content) : params.content;
|
||||
const preview = Tinode.Drafty.preview(content, 30);
|
||||
const msg = Tinode.Drafty.append(
|
||||
Tinode.Drafty.appendLineBreak(
|
||||
|
||||
Reference in New Issue
Block a user