You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-05 23:10:41 +03:00
Show day counts in call durations (#9641)
* Show day counts in call durations Previously call durations over a day long would be truncated, for example displaying as '2h 0m 0s' instead of '1d 2h 0m 0s'. * Fix strict mode errors * Fix strings Co-authored-by: Travis Ralston <travisr@matrix.org>
This commit is contained in:
@@ -119,9 +119,9 @@ export default class LegacyCallEventGrouper extends EventEmitter {
|
||||
return Boolean(this.reject);
|
||||
}
|
||||
|
||||
public get duration(): Date {
|
||||
if (!this.hangup || !this.selectAnswer) return;
|
||||
return new Date(this.hangup.getDate().getTime() - this.selectAnswer.getDate().getTime());
|
||||
public get duration(): number | null {
|
||||
if (!this.hangup || !this.selectAnswer) return null;
|
||||
return this.hangup.getDate().getTime() - this.selectAnswer.getDate().getTime();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user