diff --git a/app/components/Account/AccountSelector.jsx b/app/components/Account/AccountSelector.jsx index 6b90231650..e69fb5408d 100644 --- a/app/components/Account/AccountSelector.jsx +++ b/app/components/Account/AccountSelector.jsx @@ -52,6 +52,7 @@ class AccountSelector extends React.Component { allowUppercase: PropTypes.bool, // use it if you need to allow uppercase letters typeahead: PropTypes.bool, excludeAccounts: PropTypes.array, // array of accounts to exclude from the typeahead + includeMyActiveAccounts: PropTypes.bool, // whether to include my active accounts in the list focus: PropTypes.bool, disabled: PropTypes.bool, editable: PropTypes.bool, @@ -63,6 +64,7 @@ class AccountSelector extends React.Component { static defaultProps = { autosubscribe: false, excludeAccounts: [], + includeMyActiveAccounts: true, disabled: null, editable: null, locked: false, @@ -86,9 +88,11 @@ class AccountSelector extends React.Component { if (accountName) { this._addThisToIndex(accountName); } - this.props.myActiveAccounts.map(a => { - this._addThisToIndex(a); - }); + if (this.props.includeMyActiveAccounts) { + this.props.myActiveAccounts.map(a => { + this._addThisToIndex(a); + }); + } this.props.contacts.map(a => { this._addThisToIndex(a); }); @@ -458,18 +462,7 @@ class AccountSelector extends React.Component { error || disableActionButton; - if (selectedAccount && selectedAccount.isOwnAccount) { - linked_status = ( - - - - - - ); - } else if (selectedAccount && selectedAccount.isKnownScammer) { + if (selectedAccount && selectedAccount.isKnownScammer) { linked_status = ( ); + } else if (selectedAccount && selectedAccount.isOwnAccount) { + linked_status = ( + + + + + + ); } else if (selectedAccount) { linked_status = ( - {account.data.isOwnAccount ? ( - - ) : null} - {account.data.isContact ? ( - - ) : null} {account.data.isKnownScammer ? ( - ) : null} + ) : (account.data.isContact ? ( + + ) : (account.data.isOwnAccount ? ( + + ) : null) ) }   {account.data.name} @@ -667,11 +669,11 @@ class AccountSelector extends React.Component {