Merge from vscode 3bd60b2ba753e7fe39b42f99184bc6c5881d3551 (#4712)

This commit is contained in:
Anthony Dresser
2019-03-27 11:36:01 -07:00
committed by GitHub
parent eac3420583
commit 46b7afe558
36 changed files with 303 additions and 137 deletions

View File

@@ -144,7 +144,7 @@ export class CommentNode extends Disposable {
let reactionGroup = this.commentService.getReactionGroup(this.owner);
if (reactionGroup && reactionGroup.length) {
let commentThread = this.commentThread as modes.CommentThread2;
if (commentThread.commentThreadHandle) {
if (commentThread.commentThreadHandle !== undefined) {
let toggleReactionAction = this.createReactionPicker2();
actions.push(toggleReactionAction);
} else {
@@ -327,7 +327,7 @@ export class CommentNode extends Disposable {
let action = new ReactionAction(`reaction.${reaction.label}`, `${reaction.label}`, reaction.hasReacted && reaction.canEdit ? 'active' : '', reaction.canEdit, async () => {
try {
let commentThread = this.commentThread as modes.CommentThread2;
if (commentThread.commentThreadHandle) {
if (commentThread.commentThreadHandle !== undefined) {
await this.commentService.toggleReaction(this.owner, this.resource, this.commentThread as modes.CommentThread2, this.comment, reaction);
} else {
if (reaction.hasReacted) {
@@ -360,7 +360,7 @@ export class CommentNode extends Disposable {
let reactionGroup = this.commentService.getReactionGroup(this.owner);
if (reactionGroup && reactionGroup.length) {
let commentThread = this.commentThread as modes.CommentThread2;
if (commentThread.commentThreadHandle) {
if (commentThread.commentThreadHandle !== undefined) {
let toggleReactionAction = this.createReactionPicker2();
this._reactionsActionBar.push(toggleReactionAction, { label: false, icon: true });
} else {
@@ -386,7 +386,7 @@ export class CommentNode extends Disposable {
this._commentEditor.setSelection(new Selection(lastLine, lastColumn, lastLine, lastColumn));
let commentThread = this.commentThread as modes.CommentThread2;
if (commentThread.commentThreadHandle) {
if (commentThread.commentThreadHandle !== undefined) {
commentThread.input = {
uri: this._commentEditor.getModel()!.uri,
value: this.comment.body.value

View File

@@ -689,7 +689,7 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget
async submitComment(): Promise<void> {
const activeComment = this.getActiveComment();
if (activeComment instanceof ReviewZoneWidget) {
if ((this._commentThread as modes.CommentThread2).commentThreadHandle) {
if ((this._commentThread as modes.CommentThread2).commentThreadHandle !== undefined) {
let commentThread = this._commentThread as modes.CommentThread2;
if (commentThread.acceptInputCommand) {