From f930413779ca707833bdf08a74fd295b2eae050c Mon Sep 17 00:00:00 2001 From: Ryan Tharp Date: Wed, 5 Feb 2020 01:41:11 -0800 Subject: [PATCH 1/4] try to address travis-osx lint complaints --- ts/components/session/SessionClosableOverlay.tsx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) 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) { From c696b37edd26cfd73c3866f2a2349151d6971fa6 Mon Sep 17 00:00:00 2001 From: Ryan Tharp Date: Wed, 5 Feb 2020 02:35:15 -0800 Subject: [PATCH 2/4] not designed to have a period at the end of titleIsNow --- _locales/en/messages.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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": { From 64fabc190a0d67ea81e21380dd398ab69c0acc48 Mon Sep 17 00:00:00 2001 From: Ryan Tharp Date: Wed, 5 Feb 2020 02:35:41 -0800 Subject: [PATCH 3/4] put period back at the end --- ts/components/conversation/GroupNotification.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts/components/conversation/GroupNotification.tsx b/ts/components/conversation/GroupNotification.tsx index 4e4806e13..4186a11fe 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'); From b97c9e74087ab6a2c266902b7170179e335800a7 Mon Sep 17 00:00:00 2001 From: Ryan Tharp Date: Wed, 5 Feb 2020 03:06:15 -0800 Subject: [PATCH 4/4] lint --- ts/components/conversation/GroupNotification.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts/components/conversation/GroupNotification.tsx b/ts/components/conversation/GroupNotification.tsx index 4186a11fe..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');