From 872aae1bcd6c6203ae7b7bba656316e8fbd6a499 Mon Sep 17 00:00:00 2001 From: Juan Tejada Date: Fri, 25 Mar 2016 12:37:42 -0700 Subject: [PATCH] fix(open-tracking): Make sure icon only shows in sent perspective --- internal_packages/open-tracking/lib/open-tracking-icon.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal_packages/open-tracking/lib/open-tracking-icon.jsx b/internal_packages/open-tracking/lib/open-tracking-icon.jsx index f7e8c8a0b..7a15b36a9 100644 --- a/internal_packages/open-tracking/lib/open-tracking-icon.jsx +++ b/internal_packages/open-tracking/lib/open-tracking-icon.jsx @@ -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 (