Skip to content

Commit

Permalink
fix(comment): show reply button correctly.
Browse files Browse the repository at this point in the history
  • Loading branch information
cangzhang committed Mar 29, 2021
1 parent 2ed73ee commit 89f1a2d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@
{
"command": "codingPlugin.diff.createComment",
"group": "inline",
"when": "commentController == mrDiffComment && commentThreadIsEmpty"
"when": "commentThreadIsEmpty"
},
{
"command": "codingPlugin.diff.replyComment",
"group": "inline",
"when": "commentController == mrDiffComment && !commentThreadIsEmpty"
"when": "!commentThreadIsEmpty"
}
],
"comments/comment/title": [
Expand Down
4 changes: 1 addition & 3 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ import {
} from 'src/typings/commonTypes';
import { GitService } from 'src/common/gitService';
import { MRUriScheme } from 'src/common/contants';
import { IDiffComment, IMRData, IFileDiffParam, IDiffFile } from 'src/typings/respResult';
import { IDiffComment, IMRData, IDiffFile } from 'src/typings/respResult';
import { replyNote, ReviewComment, makeCommentRangeProvider } from 'src/reviewCommentController';
import { getDiffLineNumber, isHunkLine } from 'src/common/utils';

export async function activate(context: vscode.ExtensionContext) {
await GitService.init();
Expand Down Expand Up @@ -226,7 +225,6 @@ export async function activate(context: vscode.ExtensionContext) {
);

const cacheId = `${mr.iid}/${file.path}`;
// cachedCommentControllers[cacheId]?.dispose();
cachedCommentThreads[cacheId]?.forEach((c) => {
c?.dispose();
});
Expand Down
4 changes: 2 additions & 2 deletions src/reviewCommentController.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as vscode from 'vscode';

import { ISessionData, IDiffFileData, ICachedCommentThreads } from 'src/typings/commonTypes';
import { ISessionData, IDiffFileData } from 'src/typings/commonTypes';
import { EmptyUserAvatar, MRUriScheme } from 'src/common/contants';
import { CodingServer } from 'src/codingServer';
import { IDiffComment, IMRData, IFileDiffParam, IDiffFile } from 'src/typings/respResult';
import { IFileDiffParam } from 'src/typings/respResult';
import { getDiffLineNumber, isHunkLine } from 'src/common/utils';

let commentIdx = 0;
Expand Down

0 comments on commit 89f1a2d

Please sign in to comment.