some formatting fixes
This commit is contained in:
@@ -847,18 +847,23 @@ class MessagesView extends React.Component {
|
||||
uploader.cancel();
|
||||
}
|
||||
|
||||
// seq: seq ID of the source message
|
||||
// context: message content.
|
||||
// forwarded: true if the source message is also a forwarded message.
|
||||
// senderId: UID of the sender of the source message.
|
||||
// senderName: full name of the sender of the original message.
|
||||
handlePickReply(seq, content, forwarded, senderId, senderName) {
|
||||
console.log("forwarded message:", forwarded);
|
||||
|
||||
this.setState({reply: null});
|
||||
|
||||
if (!seq || !content) {
|
||||
return;
|
||||
}
|
||||
|
||||
content = forwarded ?
|
||||
Drafty.forwardedContent(content) :
|
||||
typeof content == 'string' ? Drafty.init(content) : content;
|
||||
content = typeof content == 'string' ? Drafty.init(content) : content;
|
||||
if (Drafty.isValid(content)) {
|
||||
content = Drafty.preview(content, QUOTED_REPLY_LENGTH, undefined, !forwarded);
|
||||
content = Drafty.preview(content, QUOTED_REPLY_LENGTH, undefined, forwarded);
|
||||
} else {
|
||||
// /!\ invalid content.
|
||||
content = Drafty.append(Drafty.init('\u26A0 '),
|
||||
@@ -990,7 +995,7 @@ class MessagesView extends React.Component {
|
||||
<ChatMessage
|
||||
tinode={this.props.tinode}
|
||||
content={msg.content}
|
||||
forwarded={msg.head ? msg.head.forwarded : null}
|
||||
forwarded={msg.head ? !!msg.head.forwarded : null}
|
||||
deleted={msg.hi}
|
||||
mimeType={msg.head ? msg.head.mime : null}
|
||||
timestamp={msg.ts}
|
||||
|
||||
+4
-3
@@ -4166,6 +4166,7 @@ class MessagesView extends (react__WEBPACK_IMPORTED_MODULE_0___default().Compone
|
||||
}
|
||||
|
||||
handlePickReply(seq, content, forwarded, senderId, senderName) {
|
||||
console.log("forwarded message:", forwarded);
|
||||
this.setState({
|
||||
reply: null
|
||||
});
|
||||
@@ -4174,10 +4175,10 @@ class MessagesView extends (react__WEBPACK_IMPORTED_MODULE_0___default().Compone
|
||||
return;
|
||||
}
|
||||
|
||||
content = forwarded ? Drafty.forwardedContent(content) : typeof content == 'string' ? Drafty.init(content) : content;
|
||||
content = typeof content == 'string' ? Drafty.init(content) : content;
|
||||
|
||||
if (Drafty.isValid(content)) {
|
||||
content = Drafty.preview(content, _config_js__WEBPACK_IMPORTED_MODULE_14__.QUOTED_REPLY_LENGTH, undefined, !forwarded);
|
||||
content = Drafty.preview(content, _config_js__WEBPACK_IMPORTED_MODULE_14__.QUOTED_REPLY_LENGTH, undefined, forwarded);
|
||||
} else {
|
||||
content = Drafty.append(Drafty.init('\u26A0 '), Drafty.wrapInto(this.props.intl.formatMessage(messages.invalid_content), 'EM'));
|
||||
}
|
||||
@@ -4325,7 +4326,7 @@ class MessagesView extends (react__WEBPACK_IMPORTED_MODULE_0___default().Compone
|
||||
messageNodes.push(react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_widgets_chat_message_jsx__WEBPACK_IMPORTED_MODULE_3__["default"], {
|
||||
tinode: this.props.tinode,
|
||||
content: msg.content,
|
||||
forwarded: msg.head ? msg.head.forwarded : null,
|
||||
forwarded: msg.head ? !!msg.head.forwarded : null,
|
||||
deleted: msg.hi,
|
||||
mimeType: msg.head ? msg.head.mime : null,
|
||||
timestamp: msg.ts,
|
||||
|
||||
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+14
-6
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user