mirror of https://github.com/vector-im/riot-web
length -> duration
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>pull/21833/head
parent
43325eb866
commit
8368aa13ca
|
@ -86,7 +86,7 @@ export default class CallEventGrouper extends EventEmitter {
|
|||
return Boolean(this.reject);
|
||||
}
|
||||
|
||||
public get length(): Date {
|
||||
public get duration(): Date {
|
||||
if (!this.hangup || !this.selectAnswer) return;
|
||||
return new Date(this.hangup.getDate().getTime() - this.selectAnswer.getDate().getTime());
|
||||
}
|
||||
|
|
|
@ -132,10 +132,10 @@ export default class CallEvent extends React.Component<IProps, IState> {
|
|||
// https://github.com/vector-im/riot-android/issues/2623
|
||||
// Also the correct hangup code as of VoIP v1 (with underscore)
|
||||
// Also, if we don't have a reason
|
||||
const length = this.props.callEventGrouper.length;
|
||||
const duration = this.props.callEventGrouper.duration;
|
||||
let text = _t("Call ended");
|
||||
if (length) {
|
||||
text += " • " + formatCallTime(length);
|
||||
if (duration) {
|
||||
text += " • " + formatCallTime(duration);
|
||||
}
|
||||
return (
|
||||
<div className="mx_CallEvent_content">
|
||||
|
|
Loading…
Reference in New Issue