fix(open-tracking): Make sure icon only shows in sent perspective

This commit is contained in:
Juan Tejada 2016-03-25 12:37:42 -07:00
parent 9298c9a129
commit 872aae1bcd

View file

@ -1,4 +1,4 @@
import {React} from 'nylas-exports'
import {React, FocusedPerspectiveStore} from 'nylas-exports'
import {RetinaImg} from 'nylas-component-kit'
import {PLUGIN_ID} from './open-tracking-constants'
@ -41,6 +41,10 @@ export default class OpenTrackingIcon extends React.Component {
}
render() {
const perspective = FocusedPerspectiveStore.current()
if (perspective.categoriesSharedName() !== 'sent') {
return false;
}
const title = this.state.opened ? "This message has been read at least once" : "This message has not been read";
return (
<div title={title} className="open-tracking-icon">