mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-11 01:54:40 +08:00
fix(open-tracking): Make sure icon only shows in sent perspective
This commit is contained in:
parent
9298c9a129
commit
872aae1bcd
1 changed files with 5 additions and 1 deletions
|
@ -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">
|
||||
|
|
Loading…
Reference in a new issue