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:
parent
440f76c3e8
commit
69e03860a0
6 changed files with 55 additions and 25 deletions
|
@ -28,7 +28,7 @@ import LegacyCallEventGrouper, {
|
|||
import AccessibleButton from '../elements/AccessibleButton';
|
||||
import InfoTooltip, { InfoTooltipKind } from '../elements/InfoTooltip';
|
||||
import AccessibleTooltipButton from '../elements/AccessibleTooltipButton';
|
||||
import { formatCallTime } from "../../../DateUtils";
|
||||
import { formatPreciseDuration } from "../../../DateUtils";
|
||||
import Clock from "../audio_messages/Clock";
|
||||
|
||||
const MAX_NON_NARROW_WIDTH = 450 / 70 * 100;
|
||||
|
@ -172,10 +172,10 @@ export default class LegacyCallEvent extends React.PureComponent<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 duration = this.props.callEventGrouper.duration;
|
||||
const duration = this.props.callEventGrouper.duration!;
|
||||
let text = _t("Call ended");
|
||||
if (duration) {
|
||||
text += " • " + formatCallTime(duration);
|
||||
text += " • " + formatPreciseDuration(duration);
|
||||
}
|
||||
return (
|
||||
<div className="mx_LegacyCallEvent_content">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue