Skip to content
This repository was archived by the owner on Jan 22, 2019. It is now read-only.

Commit f944aa7

Browse files
authored
fix: only show one code intel status indicator (#251)
1 parent 2232d8e commit f944aa7

File tree

2 files changed

+24
-20
lines changed

2 files changed

+24
-20
lines changed

src/shared/components/CodeViewToolbar.tsx

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,18 @@ export class CodeViewToolbar extends React.Component<CodeViewToolbarProps, CodeV
8383
</div>
8484
)}
8585
</ul>
86-
<CodeIntelStatusIndicator
87-
key="code-intel-status"
88-
userIsSiteAdmin={currentUser ? currentUser.siteAdmin : false}
89-
repoPath={this.props.repoPath}
90-
commitID={this.props.commitID}
91-
filePath={this.props.filePath}
92-
onChange={this.props.onEnabledChange}
93-
simpleProviderFns={this.props.simpleProviderFns}
94-
site={site}
95-
/>
86+
{!this.props.extensionsController && (
87+
<CodeIntelStatusIndicator
88+
key="code-intel-status"
89+
userIsSiteAdmin={currentUser ? currentUser.siteAdmin : false}
90+
repoPath={this.props.repoPath}
91+
commitID={this.props.commitID}
92+
filePath={this.props.filePath}
93+
onChange={this.props.onEnabledChange}
94+
simpleProviderFns={this.props.simpleProviderFns}
95+
site={site}
96+
/>
97+
)}
9698
{this.props.baseCommitID &&
9799
this.props.baseHasFileContents && (
98100
<OpenOnSourcegraph

src/shared/components/LegacyCodeViewToolbar.tsx

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -98,16 +98,18 @@ export class CodeViewToolbar extends React.Component<CodeViewToolbarProps, CodeV
9898
</div>
9999
)}
100100
</ul>
101-
<CodeIntelStatusIndicator
102-
key="code-intel-status"
103-
userIsSiteAdmin={currentUser ? currentUser.siteAdmin : false}
104-
repoPath={this.props.repoPath}
105-
commitID={this.props.baseCommitID}
106-
filePath={this.props.filePath}
107-
onChange={this.props.onEnabledChange}
108-
simpleProviderFns={this.props.simpleProviderFns}
109-
site={site}
110-
/>
101+
{!this.props.extensionsController && (
102+
<CodeIntelStatusIndicator
103+
key="code-intel-status"
104+
userIsSiteAdmin={currentUser ? currentUser.siteAdmin : false}
105+
repoPath={this.props.repoPath}
106+
commitID={this.props.baseCommitID}
107+
filePath={this.props.filePath}
108+
onChange={this.props.onEnabledChange}
109+
simpleProviderFns={this.props.simpleProviderFns}
110+
site={site}
111+
/>
112+
)}
111113
<OpenOnSourcegraph
112114
label={`View File${this.props.headCommitID ? ' (base)' : ''}`}
113115
ariaLabel="View file on Sourcegraph"

0 commit comments

Comments
 (0)