Skip to content

Commit 89802fd

Browse files
Copilotalexr00
andcommitted
Fix TypeScript errors by removing unused isJustCreated parameter
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
1 parent 2392dfe commit 89802fd

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/github/utils.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ export function getCommentCollapsibleState(thread: IReviewThread, expand?: boole
175175
}
176176

177177

178-
export function updateThreadWithRange(context: vscode.ExtensionContext, vscodeThread: GHPRCommentThread, reviewThread: IReviewThread, githubRepositories?: GitHubRepository[], expand?: boolean, isJustCreated?: boolean) {
178+
export function updateThreadWithRange(context: vscode.ExtensionContext, vscodeThread: GHPRCommentThread, reviewThread: IReviewThread, githubRepositories?: GitHubRepository[], expand?: boolean) {
179179
if (!vscodeThread.range) {
180180
return;
181181
}
@@ -184,13 +184,13 @@ export function updateThreadWithRange(context: vscode.ExtensionContext, vscodeTh
184184
if (editor.document.uri.toString() === vscodeThread.uri.toString()) {
185185
const endLine = editor.document.lineAt(vscodeThread.range.end.line);
186186
const range = new vscode.Range(vscodeThread.range.start.line, 0, vscodeThread.range.end.line, endLine.text.length);
187-
updateThread(context, vscodeThread, reviewThread, githubRepositories, expand, range, isJustCreated);
187+
updateThread(context, vscodeThread, reviewThread, githubRepositories, expand, range);
188188
break;
189189
}
190190
}
191191
}
192192

193-
export function updateThread(context: vscode.ExtensionContext, vscodeThread: GHPRCommentThread, reviewThread: IReviewThread, githubRepositories?: GitHubRepository[], expand?: boolean, range?: vscode.Range, isJustCreated?: boolean) {
193+
export function updateThread(context: vscode.ExtensionContext, vscodeThread: GHPRCommentThread, reviewThread: IReviewThread, githubRepositories?: GitHubRepository[], expand?: boolean, range?: vscode.Range) {
194194
if (reviewThread.viewerCanResolve && !reviewThread.isResolved) {
195195
vscodeThread.contextValue = 'canResolve';
196196
} else if (reviewThread.viewerCanUnresolve && reviewThread.isResolved) {
@@ -209,7 +209,7 @@ export function updateThread(context: vscode.ExtensionContext, vscodeThread: GHP
209209
applicability: newApplicabilityState
210210
};
211211
}
212-
vscodeThread.collapsibleState = getCommentCollapsibleState(reviewThread, expand, undefined, isJustCreated);
212+
vscodeThread.collapsibleState = getCommentCollapsibleState(reviewThread, expand);
213213
if (range) {
214214
vscodeThread.range = range;
215215
}

src/view/pullRequestCommentController.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ export class PullRequestCommentController extends CommentControllerBase implemen
241241
newThread = this._pendingCommentThreadAdds[index];
242242
newThread.gitHubThreadId = thread.id;
243243
newThread.comments = thread.comments.map(c => new GHPRComment(this._context, c, newThread!, this._githubRepositories));
244-
updateThreadWithRange(this._context, newThread, thread, this._githubRepositories, undefined, true);
244+
updateThreadWithRange(this._context, newThread, thread, this._githubRepositories);
245245
this._pendingCommentThreadAdds.splice(index, 1);
246246
} else {
247247
const openPREditors = await this.getPREditors(vscode.window.visibleTextEditors);

src/view/reviewCommentController.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ export class ReviewCommentController extends CommentControllerBase implements Co
297297
newThread = this._pendingCommentThreadAdds[index];
298298
newThread.gitHubThreadId = thread.id;
299299
newThread.comments = thread.comments.map(c => new GHPRComment(this._context, c, newThread, githubRepositories));
300-
updateThreadWithRange(this._context, newThread, thread, githubRepositories, undefined, true);
300+
updateThreadWithRange(this._context, newThread, thread, githubRepositories);
301301
this._pendingCommentThreadAdds.splice(index, 1);
302302
} else {
303303
const fullPath = nodePath.join(this._repository.rootUri.path, path).replace(/\\/g, '/');

0 commit comments

Comments
 (0)