Mute timestamps for irrelevant updates

Other fix for https://github.com/vector-im/riot-web/issues/5697

See https://github.com/vector-im/riot-web/issues/9747
This commit is contained in:
Travis Ralston 2019-05-21 18:57:16 -06:00
parent 4779144b2e
commit 68c4ee9374
2 changed files with 13 additions and 4 deletions

View file

@ -23,12 +23,17 @@ export default class MessageTimestamp extends React.Component {
static propTypes = {
ts: PropTypes.number.isRequired,
showTwelveHour: PropTypes.bool,
ariaHidden: PropTypes.bool,
};
render() {
const date = new Date(this.props.ts);
return (
<span className="mx_MessageTimestamp" title={formatFullDate(date, this.props.showTwelveHour)}>
<span
className="mx_MessageTimestamp"
title={formatFullDate(date, this.props.showTwelveHour)}
aria-hidden={this.props.ariaHidden}
>
{ formatTime(date, this.props.showTwelveHour) }
</span>
);