mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-09-29 07:55:55 +08:00
Don’t allow manual creation of “Found in Mail” contacts because they are not synced anywhere #1722
This commit is contained in:
parent
8796904890
commit
beee384ebb
1 changed files with 9 additions and 2 deletions
|
@ -28,12 +28,19 @@ class AddContactToolbarWithData extends React.Component<AddContactToolbarProps>
|
|||
|
||||
render() {
|
||||
const { editing, perspective } = this.props;
|
||||
const enabled = 'accountId' in perspective && editing === false && perspective.accountId;
|
||||
const enabled =
|
||||
'accountId' in perspective &&
|
||||
editing === false &&
|
||||
perspective.accountId &&
|
||||
perspective.type !== 'found-in-mail';
|
||||
const acct = 'accountId' in perspective && AccountStore.accountForId(perspective.accountId);
|
||||
|
||||
return (
|
||||
<div style={{ display: 'flex', order: 1000 }}>
|
||||
<BindGlobalCommands key={enabled} commands={enabled ? { 'core:add-item': this.onAdd } : {}}>
|
||||
<BindGlobalCommands
|
||||
key={`${enabled}`}
|
||||
commands={enabled ? { 'core:add-item': this.onAdd } : {}}
|
||||
>
|
||||
<button
|
||||
tabIndex={-1}
|
||||
disabled={!enabled}
|
||||
|
|
Loading…
Add table
Reference in a new issue