Fix the 'finishDraft' action

This commit is contained in:
RMacfarlane
2019-10-16 11:53:12 -07:00
parent a03e8175c2
commit 1e3ddac3e1
2 changed files with 9 additions and 6 deletions

View File

@ -118,7 +118,7 @@
{
"command": "mywiki.finishDraft",
"group": "inline",
"when": "commentController == commment-sample && commentThread == draft"
"when": "commentController == comment-sample && commentThread == draft"
}
],
"comments/comment/title": [

View File

@ -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) => {