More UI tweaks (calls).

1. Localize video call messages.
2. Display call message previews correctly.
This commit is contained in:
aforge
2022-04-21 21:10:00 -07:00
parent ad98bec73e
commit 0daef53c87
5 changed files with 33 additions and 7 deletions
+4 -1
View File
@@ -71,7 +71,10 @@ class Contact extends React.Component {
// The this.props.preview contains alreay shortened Drafty or string.
let preview;
if (typeof this.props.preview == 'string') {
if (this.props.previewIsVideoCall) {
preview = <><i className='material-icons'>{this.props.previewIsResponse ? 'call_received' : 'call_made'}</i>
<i className='material-icons'>video_call</i></>;
} else if (typeof this.props.preview == 'string') {
preview = this.props.preview;
} else if (Drafty.isValid(this.props.preview)) {
preview = React.createElement(React.Fragment, null, Drafty.format(this.props.preview, previewFormatter,