fix for breakage around forwarding review

This commit is contained in:
or-else
2022-05-12 18:29:21 -07:00
parent 5087a70d5e
commit a9e4f644a2
7 changed files with 33 additions and 38 deletions
+8 -12
View File
@@ -226,16 +226,6 @@ class MessagesView extends React.Component {
} else if (nextProps.topic != prevState.topic) {
const topic = nextProps.tinode.getTopic(nextProps.topic);
let reply = null;
if (nextProps.forwardMessage) {
// We are forwarding a message. Show preview.
const preview = nextProps.forwardMessage.preview;
reply = {
content: preview,
seq: null
};
}
nextState = {
topic: nextProps.topic,
docPreview: null,
@@ -244,11 +234,18 @@ class MessagesView extends React.Component {
typingIndicator: false,
scrollPosition: 0,
fetchingMessages: false,
reply: reply,
showGoToLastButton: false,
deleted: topic._deleted
};
if (nextProps.forwardMessage) {
// We are forwarding a message. Show preview.
nextState.reply = {
content: nextProps.forwardMessage.preview,
seq: null
};
}
if (topic) {
// Topic exists.
const subs = [];
@@ -926,7 +923,6 @@ class MessagesView extends React.Component {
// 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, senderId, senderName) {