Conversation.getTitle(): return 'unknown contact' if no data

This commit is contained in:
Scott Nonnenberg 2020-07-10 11:35:54 -07:00
parent ba6cb653bf
commit 6afa6db5be
2 changed files with 6 additions and 2 deletions

View file

@ -7,6 +7,10 @@
"message": "Copy error and quit", "message": "Copy error and quit",
"description": "Shown in the top-level error popup, allowing user to copy the error text and close the app" "description": "Shown in the top-level error popup, allowing user to copy the error text and close the app"
}, },
"unknownContact": {
"message": "Unknown contact",
"description": "Shown as the name of a contact if we don't have any displayable information about them"
},
"unknownGroup": { "unknownGroup": {
"message": "Unknown group", "message": "Unknown group",
"description": "Shown as the name of a group if we don't have any information about it" "description": "Shown as the name of a group if we don't have any information about it"

View file

@ -2320,9 +2320,9 @@
getTitle() { getTitle() {
if (this.isPrivate()) { if (this.isPrivate()) {
return this.get('name') || this.getNumber(); return this.get('name') || this.getNumber() || i18n('unknownContact');
} }
return this.get('name') || 'Unknown group'; return this.get('name') || i18n('unknownGroup');
}, },
getProfileName() { getProfileName() {