Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Add an option to enable reverse name parsing #197

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/client-app/src/config-schema.es6
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ export default {
'default': false,
'title': "Display conversations in descending chronological order",
},
lastNameFirstNameParsing: {
'type': 'boolean',
'default': true,
'title': "Automatically parse names that are in the 'Last Name, First Name' format"
},
},
},
composing: {
Expand Down
6 changes: 6 additions & 0 deletions packages/client-app/src/flux/models/contact.es6
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,12 @@ export default class Contact extends Model {
}

_parseReverseNames(name) {
// If the user doesn't want to parse Reverse Names, simply return an empty array
// Fixed https://github.com/nylas-mail-lives/nylas-mail/issues/179
if( !NylasEnv.config.get('core.reading.lastNameFirstNameParsing') ) {
return [];
}

const parts = [];
const [lastName, remainder] = name.split(', ');
if (remainder) {
Expand Down