diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 0b9c9db1a..139b7d0c5 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -1994,7 +1994,8 @@ "Shown in the conversation history when someone updates the group" }, "titleIsNow": { - "message": "Group name has been set to '$name$'.", + "comment": "Do not add a period here, used as a fragment and will break unit test", + "message": "Group name has been set to '$name$'", "description": "Shown in the conversation history when someone changes the title of the group", "placeholders": { diff --git a/ts/components/conversation/GroupNotification.tsx b/ts/components/conversation/GroupNotification.tsx index 4e4806e13..9cec3d1bf 100644 --- a/ts/components/conversation/GroupNotification.tsx +++ b/ts/components/conversation/GroupNotification.tsx @@ -49,7 +49,7 @@ export class GroupNotification extends React.Component { switch (type) { case 'name': - return i18n('titleIsNow', [newName || '']); + return `${i18n('titleIsNow', [newName || ''])}.`; case 'add': if (!contacts || !contacts.length) { throw new Error('Group update is missing contacts'); diff --git a/ts/components/session/SessionClosableOverlay.tsx b/ts/components/session/SessionClosableOverlay.tsx index 38379aac2..53d7ef327 100644 --- a/ts/components/session/SessionClosableOverlay.tsx +++ b/ts/components/session/SessionClosableOverlay.tsx @@ -61,7 +61,7 @@ export class SessionClosableOverlay extends React.Component { }); } - const friends = conversationList.map((d: any) => { + return conversationList.map((d: any) => { const lokiProfile = d.getLokiProfile(); const name = lokiProfile ? lokiProfile.displayName : 'Anonymous'; @@ -79,8 +79,6 @@ export class SessionClosableOverlay extends React.Component { existingMember, }; }); - - return friends; } // tslint:disable-next-line max-func-body-length */ @@ -137,7 +135,6 @@ export class SessionClosableOverlay extends React.Component { placeholder = window.i18n('createClosedGroupPlaceholder'); break; default: - break; } const { groupName, selectedMembers } = this.state; @@ -251,7 +248,7 @@ export class SessionClosableOverlay extends React.Component { private renderMemberList() { const members = this.getContacts(); - const memberList = members.map((member: ContactType) => ( + return members.map((member: ContactType) => ( { }} /> )); - - return memberList; } private handleSelectMember(member: ContactType) {