diff --git a/internal_packages/message-list/lib/message-controls.cjsx b/internal_packages/message-list/lib/message-controls.cjsx index a0d65ecd8..fc78bc837 100644 --- a/internal_packages/message-list/lib/message-controls.cjsx +++ b/internal_packages/message-list/lib/message-controls.cjsx @@ -1,5 +1,5 @@ React = require 'react' -{Actions} = require 'nylas-exports' +{Actions, NamespaceStore} = require 'nylas-exports' {RetinaImg, ButtonDropdown} = require 'nylas-component-kit' class MessageControls extends React.Component @@ -31,6 +31,16 @@ class MessageControls extends React.Component {button} + _primaryMessageAction: => + if @_replyType() is "reply" +
+ +
+ else # if "reply-all" +
+ +
+ _secondaryMessageActions: -> if @_replyType() is "reply" return [@_replyAllAction(), @_forwardAction()] @@ -60,7 +70,9 @@ class MessageControls extends React.Component Actions.composeForward(thread: @props.thread, message: @props.message) _replyType: => - if @props.message.cc.length is 0 and @props.message.to.length is 1 + emails = @props.message.to.map (item) -> item.email.toLowerCase().trim() + myEmail = NamespaceStore.current()?.me().email.toLowerCase().trim() + if @props.message.cc.length is 0 and @props.message.to.length is 1 and emails[0] is myEmail return "reply" else return "reply-all" diff --git a/internal_packages/message-list/stylesheets/message-list.less b/internal_packages/message-list/stylesheets/message-list.less index 59066a8db..d60b77fff 100644 --- a/internal_packages/message-list/stylesheets/message-list.less +++ b/internal_packages/message-list/stylesheets/message-list.less @@ -255,6 +255,10 @@ padding-bottom: @spacing-standard; padding-top: 19px; + .primary-message-action{ + padding: 7px 1em; + } + .message-actions-wrap { text-align: right; } diff --git a/static/components/button-dropdown.less b/static/components/button-dropdown.less index e79aca1a5..57a15a0a9 100644 --- a/static/components/button-dropdown.less +++ b/static/components/button-dropdown.less @@ -7,7 +7,7 @@ .btn(); height: 32px; border-radius: 4px 0 0 4px; - padding-top: 7px; + padding: 0; } .secondary-picker { .btn();