Add Retry option in context menu for failed messages.

This commit is contained in:
aforge
2020-01-20 21:25:22 -08:00
parent 065115d2bf
commit 0081ed3716
13 changed files with 185 additions and 61 deletions
+3 -1
View File
@@ -58,7 +58,9 @@ export default class ChatMessage extends React.Component {
handleContextClick(e) {
e.preventDefault();
e.stopPropagation();
this.props.showContextMenu({ seq: this.props.seq, y: e.pageY, x: e.pageX });
const menuItems = this.props.received == Tinode.MESSAGE_STATUS_FAILED ? ['menu_item_send_retry'] : [];
this.props.showContextMenu({ seq: this.props.seq, content: this.props.content,
y: e.pageY, x: e.pageX }, menuItems);
}
handleProgress(ratio) {