@@ -3,7 +3,6 @@ import { PRDirectory } from '../pullrequest/diffViewHelper';
3
3
import { AbstractBaseNode } from './abstractBaseNode' ;
4
4
import { PullRequestFilesNode } from './pullRequestFilesNode' ;
5
5
import { Container } from 'src/container' ;
6
- import { Logger } from 'src/logger' ;
7
6
import { PullRequest } from 'src/bitbucket/model' ;
8
7
import * as crypto from 'crypto' ;
9
8
@@ -13,6 +12,7 @@ export class DirectoryNode extends AbstractBaseNode {
13
12
private directoryData : PRDirectory ,
14
13
private section : 'files' | 'commits' = 'files' ,
15
14
private pr : PullRequest ,
15
+ private commitHash ?: string ,
16
16
) {
17
17
super ( ) ;
18
18
}
@@ -29,7 +29,7 @@ export class DirectoryNode extends AbstractBaseNode {
29
29
30
30
const dirId =
31
31
this . section === 'commits'
32
- ? `repo-${ repoId } -pr-${ prId } -section-${ this . section } -commit-${ this . pr . data . source . commitHash } -directory-${ dirPath } `
32
+ ? `repo-${ repoId } -pr-${ prId } -section-${ this . section } -commit-${ this . commitHash } -directory-${ dirPath } `
33
33
: `repo-${ repoId } -pr-${ prId } -section-${ this . section } -directory-${ dirPath } ` ;
34
34
return crypto . createHash ( 'md5' ) . update ( dirId ) . digest ( 'hex' ) ;
35
35
}
@@ -56,10 +56,8 @@ export class DirectoryNode extends AbstractBaseNode {
56
56
57
57
try {
58
58
this . _isDirectClick = true ;
59
- Logger . debug ( `Setting directory ${ this . directoryId } checked state to ${ value } ` ) ;
60
59
Container . checkboxStateManager . setChecked ( this . directoryId , value ) ;
61
60
62
- Logger . debug ( 'Propagating state to children' ) ;
63
61
this . directoryData . files . forEach ( ( file ) => {
64
62
const fileNode = new PullRequestFilesNode ( file , this . section , this . pr ) ;
65
63
Container . checkboxStateManager . setChecked ( fileNode . fileId , value ) ;
@@ -106,8 +104,6 @@ export class DirectoryNode extends AbstractBaseNode {
106
104
item . contextValue = `directory${ allChecked ? '.checked' : '' } ` ;
107
105
}
108
106
109
- Logger . debug ( 'directoryId' , this . directoryId ) ;
110
-
111
107
if ( ! this . isRootFilesDirectory ) {
112
108
item . id = this . directoryId ;
113
109
}
0 commit comments