Don't try to show unset display name
In the ReadReceiptMarker title, show the display name only when it is not the same as the user ID.
This commit is contained in:
parent
7e1913ef3c
commit
3d4feac75b
2 changed files with 17 additions and 6 deletions
|
@ -185,12 +185,22 @@ module.exports = React.createClass({
|
||||||
|
|
||||||
let title;
|
let title;
|
||||||
if (this.props.timestamp) {
|
if (this.props.timestamp) {
|
||||||
title = _t(
|
const dateString = formatDate(new Date(this.props.timestamp), this.props.showTwelveHour);
|
||||||
"Seen by %(displayName)s (%(userName)s) at %(dateTime)s",
|
if (this.props.member.userId === this.props.member.rawDisplayName) {
|
||||||
{displayName: this.props.member.rawDisplayName,
|
title = _t(
|
||||||
userName: this.props.member.userId,
|
"Seen by %(userName)s at %(dateTime)s",
|
||||||
dateTime: formatDate(new Date(this.props.timestamp), this.props.showTwelveHour)},
|
{userName: this.props.member.userId,
|
||||||
);
|
dateTime: dateString},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
title = _t(
|
||||||
|
"Seen by %(displayName)s (%(userName)s) at %(dateTime)s",
|
||||||
|
{displayName: this.props.member.rawDisplayName,
|
||||||
|
userName: this.props.member.userId,
|
||||||
|
dateTime: dateString},
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -389,6 +389,7 @@
|
||||||
"Offline": "Offline",
|
"Offline": "Offline",
|
||||||
"Unknown": "Unknown",
|
"Unknown": "Unknown",
|
||||||
"Replying": "Replying",
|
"Replying": "Replying",
|
||||||
|
"Seen by %(userName)s at %(dateTime)s": "Seen by %(userName)s at %(dateTime)s",
|
||||||
"Seen by %(displayName)s (%(userName)s) at %(dateTime)s": "Seen by %(displayName)s (%(userName)s) at %(dateTime)s",
|
"Seen by %(displayName)s (%(userName)s) at %(dateTime)s": "Seen by %(displayName)s (%(userName)s) at %(dateTime)s",
|
||||||
"No rooms to show": "No rooms to show",
|
"No rooms to show": "No rooms to show",
|
||||||
"Unnamed room": "Unnamed room",
|
"Unnamed room": "Unnamed room",
|
||||||
|
|
Loading…
Reference in a new issue