{Actions, React, FocusedContentStore, ChangeUnreadTask} = require 'nylas-exports' {RetinaImg} = require 'nylas-component-kit' class ThreadToggleUnreadButton extends React.Component @displayName: "ThreadToggleUnreadButton" @containerRequired: false render: => fragment = if @props.thread?.unread then "read" else "unread" _onClick: (e) => task = new ChangeUnreadTask source: "Toolbar Button: Thread List" thread: @props.thread unread: !@props.thread.unread Actions.queueTask(task) Actions.popSheet() e.stopPropagation() module.exports = ThreadToggleUnreadButton