From 8368aa13ca6eb0450a78b85f32c7e2ea7faf4782 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Fri, 6 Aug 2021 14:38:53 +0200 Subject: [PATCH] length -> duration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- src/components/structures/CallEventGrouper.ts | 2 +- src/components/views/messages/CallEvent.tsx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/structures/CallEventGrouper.ts b/src/components/structures/CallEventGrouper.ts index 861c978bb0..2b18a4316c 100644 --- a/src/components/structures/CallEventGrouper.ts +++ b/src/components/structures/CallEventGrouper.ts @@ -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()); } diff --git a/src/components/views/messages/CallEvent.tsx b/src/components/views/messages/CallEvent.tsx index 107832bfc2..bc868c35b3 100644 --- a/src/components/views/messages/CallEvent.tsx +++ b/src/components/views/messages/CallEvent.tsx @@ -132,10 +132,10 @@ export default class CallEvent extends React.Component { // 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 (