mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-22 23:23:54 +08:00
Fix when checking if draft is a reply when getting accounts for send
This commit is contained in:
parent
3bcbec4118
commit
1435904f3c
1 changed files with 4 additions and 4 deletions
|
@ -530,7 +530,7 @@ class ComposerView extends React.Component
|
||||||
body: draft.body
|
body: draft.body
|
||||||
files: draft.files
|
files: draft.files
|
||||||
subject: draft.subject
|
subject: draft.subject
|
||||||
accounts: @_getAccounts()
|
accounts: @_getAccountsForSend()
|
||||||
|
|
||||||
if !@state.populated
|
if !@state.populated
|
||||||
_.extend state,
|
_.extend state,
|
||||||
|
@ -577,8 +577,8 @@ class ComposerView extends React.Component
|
||||||
enabledFields.push Fields.Body
|
enabledFields.push Fields.Body
|
||||||
return enabledFields
|
return enabledFields
|
||||||
|
|
||||||
_getAccounts: =>
|
_getAccountsForSend: =>
|
||||||
if @props.mode is 'inline'
|
if @_proxy.draft()?.replyToMessageId?
|
||||||
[AccountStore.accountForId(@_proxy.draft().accountId)]
|
[AccountStore.accountForId(@_proxy.draft().accountId)]
|
||||||
else
|
else
|
||||||
AccountStore.accounts()
|
AccountStore.accounts()
|
||||||
|
@ -586,7 +586,7 @@ class ComposerView extends React.Component
|
||||||
# When the account store changes, the From field may or may not still
|
# When the account store changes, the From field may or may not still
|
||||||
# be in scope. We need to make sure to update our enabled fields.
|
# be in scope. We need to make sure to update our enabled fields.
|
||||||
_onAccountStoreChanged: =>
|
_onAccountStoreChanged: =>
|
||||||
accounts = @_getAccounts()
|
accounts = @_getAccountsForSend()
|
||||||
enabledFields = if @_shouldShowFromField(@_proxy?.draft())
|
enabledFields = if @_shouldShowFromField(@_proxy?.draft())
|
||||||
@state.enabledFields.concat [Fields.From]
|
@state.enabledFields.concat [Fields.From]
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue