Archive button no longer appears in sent folder

Summary: Archive button doesnt appear in sent folder

Test Plan: tested manually

Reviewers: evan, bengotow

Reviewed By: bengotow

Maniphest Tasks: T3428

Differential Revision: https://phab.nylas.com/D1987
This commit is contained in:
EthanBlackburn 2015-09-08 14:16:51 -07:00
parent 16eb6fd07b
commit 1ba1df8103

View file

@ -32,7 +32,7 @@ class ThreadListQuickActions extends React.Component
newProps.thread.id isnt @props?.thread.id
_shouldDisplayArchiveButton: =>
if @props.categoryId != CategoryStore.getStandardCategory('archive')?.id and @props.categoryId != CategoryStore.getStandardCategory('trash')?.id
if @props.categoryId not in [CategoryStore.getStandardCategory('archive')?.id, CategoryStore.getStandardCategory('trash')?.id, CategoryStore.getStandardCategory('sent')?.id]
if AccountStore.current().usesLabels()
if @props.thread.labels.length == 1 and (@props.thread.labels[0].name == "archive" or @props.thread.labels[0].name == "all")
return false