mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-09-06 12:44:30 +08:00
fix(composer-view): always show subject, unless replyToMessageId exists. fixes T3495.
Summary: add showing subject when replyToMessageId exists Test Plan: added test. all previous tests remain green. Reviewers: bengotow, evan Reviewed By: evan Maniphest Tasks: T3495 Differential Revision: https://phab.nylas.com/D1989
This commit is contained in:
parent
ccfe7ce36c
commit
433b143005
2 changed files with 6 additions and 5 deletions
|
@ -497,7 +497,8 @@ class ComposerView extends React.Component
|
|||
draft = @_proxy.draft()
|
||||
if _.isEmpty(draft.subject ? "") then return true
|
||||
else if @isForwardedMessage() then return true
|
||||
else return false
|
||||
else if draft.replyToMessageId then return false
|
||||
else return true
|
||||
|
||||
_shouldAcceptDrop: (event) =>
|
||||
# Ensure that you can't pick up a file and drop it on the same draft
|
||||
|
|
|
@ -246,15 +246,15 @@ describe "populated composer", ->
|
|||
makeComposer.call @
|
||||
expect(@composer._shouldShowSubject()).toBe true
|
||||
|
||||
it "doesn't show subject when subject has fwd text in it", ->
|
||||
useDraft.call @, subject: "Trick fwd"
|
||||
it "doesn't show subject when replyToMessageId exists", ->
|
||||
useDraft.call @, subject: "should hide", replyToMessageId: "some-id"
|
||||
makeComposer.call @
|
||||
expect(@composer._shouldShowSubject()).toBe false
|
||||
|
||||
it "doesn't show the subject otherwise", ->
|
||||
it "shows the subject otherwise", ->
|
||||
useDraft.call @, subject: "Foo bar baz"
|
||||
makeComposer.call @
|
||||
expect(@composer._shouldShowSubject()).toBe false
|
||||
expect(@composer._shouldShowSubject()).toBe true
|
||||
|
||||
describe "when deciding whether or not to show cc and bcc", ->
|
||||
it "doesn't show cc when there's no one to cc", ->
|
||||
|
|
Loading…
Add table
Reference in a new issue