more idimatic VC formatting, better presentation of preview

This commit is contained in:
or-else
2022-05-30 19:51:58 -07:00
parent eef880c448
commit e287755f13
11 changed files with 124 additions and 58 deletions
+1 -5
View File
@@ -26,7 +26,6 @@ import { CALL_STATE_OUTGOING_INITATED, CALL_STATE_IN_PROGRESS } from '../constan
import { blobToBase64, fileToBase64, imageScaled, makeImageUrl } from '../lib/blob-helpers.js';
import HashNavigation from '../lib/navigation.js';
import { bytesToHumanSize, shortDateFormat } from '../lib/strformat.js';
import { isVideoCall } from '../lib/utils.js';
// Run timer with this frequency (ms) for checking notification queue.
const NOTIFICATION_EXEC_INTERVAL = 300;
@@ -1137,15 +1136,12 @@ class MessagesView extends React.Component {
);
prevDate = thisDate;
}
const duration = msg.head ? msg.head['webrtc-duration'] : undefined;
messageNodes.push(
<ChatMessage
tinode={this.props.tinode}
content={msg.content}
mimeType={msg.head ? msg.head.mime : null}
mimeType={msg.head && msg.head.mime}
timestamp={msg.ts}
callState={msg.head ? msg.head.webrtc : null}
duration={duration}
response={isReply}
seq={msg.seq}
isGroup={groupTopic}