mirror of
https://github.com/microsoft/vscode-extension-samples.git
synced 2026-04-27 16:55:44 +08:00
Fix the 'finishDraft' action
This commit is contained in:
@ -118,7 +118,7 @@
|
||||
{
|
||||
"command": "mywiki.finishDraft",
|
||||
"group": "inline",
|
||||
"when": "commentController == commment-sample && commentThread == draft"
|
||||
"when": "commentController == comment-sample && commentThread == draft"
|
||||
}
|
||||
],
|
||||
"comments/comment/title": [
|
||||
|
||||
@ -54,12 +54,15 @@ export function activate(context: vscode.ExtensionContext) {
|
||||
return;
|
||||
}
|
||||
|
||||
thread.contextValue = undefined;
|
||||
thread.collapsibleState = vscode.CommentThreadCollapsibleState.Collapsed;
|
||||
let newComment = new NoteComment(reply.text, vscode.CommentMode.Preview, { name: 'vscode' }, thread);
|
||||
thread.comments = [...thread.comments, newComment].map(comment => {
|
||||
comment.label = undefined;
|
||||
return comment;
|
||||
});
|
||||
if (reply.text) {
|
||||
let newComment = new NoteComment(reply.text, vscode.CommentMode.Preview, { name: 'vscode' }, thread);
|
||||
thread.comments = [...thread.comments, newComment].map(comment => {
|
||||
comment.label = undefined;
|
||||
return comment;
|
||||
});
|
||||
}
|
||||
}));
|
||||
|
||||
context.subscriptions.push(vscode.commands.registerCommand('mywiki.deleteNoteComment', (comment: NoteComment) => {
|
||||
|
||||
Reference in New Issue
Block a user