mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-20 22:23:53 +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
|
||||
files: draft.files
|
||||
subject: draft.subject
|
||||
accounts: @_getAccounts()
|
||||
accounts: @_getAccountsForSend()
|
||||
|
||||
if !@state.populated
|
||||
_.extend state,
|
||||
|
@ -577,8 +577,8 @@ class ComposerView extends React.Component
|
|||
enabledFields.push Fields.Body
|
||||
return enabledFields
|
||||
|
||||
_getAccounts: =>
|
||||
if @props.mode is 'inline'
|
||||
_getAccountsForSend: =>
|
||||
if @_proxy.draft()?.replyToMessageId?
|
||||
[AccountStore.accountForId(@_proxy.draft().accountId)]
|
||||
else
|
||||
AccountStore.accounts()
|
||||
|
@ -586,7 +586,7 @@ class ComposerView extends React.Component
|
|||
# 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.
|
||||
_onAccountStoreChanged: =>
|
||||
accounts = @_getAccounts()
|
||||
accounts = @_getAccountsForSend()
|
||||
enabledFields = if @_shouldShowFromField(@_proxy?.draft())
|
||||
@state.enabledFields.concat [Fields.From]
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue