File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,11 @@ export function activate(): void {
1616 if ( ! editor ) {
1717 return
1818 }
19+ const settings = resolveSettings ( sourcegraph . configuration . get < Settings > ( ) . value )
20+ if ( ! settings [ 'discussions.decorations.inline' ] ) {
21+ editor . setDecorations ( decorationType , [ ] ) // clear decorations
22+ return
23+ }
1924
2025 const uri = resolveURI ( editor . document . uri )
2126
@@ -28,11 +33,6 @@ export function activate(): void {
2833
2934 const decorations : sourcegraph . TextDocumentDecoration [ ] = [ ]
3035 for ( const thread of threads . nodes ) {
31- const settings = resolveSettings ( sourcegraph . configuration . get < Settings > ( ) . value )
32- if ( ! settings [ 'discussions.decorations.inline' ] ) {
33- return
34- }
35-
3636 if ( thread . target . __typename !== 'DiscussionThreadTargetRepo' ) {
3737 return
3838 }
You can’t perform that action at this time.
0 commit comments