Skip to content

Commit

Permalink
Fix new discussion life cycle on description
Browse files Browse the repository at this point in the history
  • Loading branch information
Frédéric Collonval committed Mar 2, 2021
1 parent f5bd606 commit 5e41037
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/diff/CommentThread.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export class CommentThread extends Panel {
} else {
const msg = this._thread.comments[0]
? `${this._thread.comments[0].userName} ${this._thread.comments[0].text}`
: 'Start a new discussion';
: 'Leave a comment';
const node = generateNode('p', null, msg);
this.addWidget(new Widget({ node }));
}
Expand Down
3 changes: 2 additions & 1 deletion src/components/tab/PullRequestDescriptionTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,11 @@ export class PullRequestDescriptionTab extends Panel {
thread_ => thread.id === thread_.id
);
this.threads.splice(threadIndex, 1);
this.layout.removeWidget(widget);
widget.parent = null;
widget.dispose();
}
});

this.insertWidget(this.widgets.length - 1, widget);
}
}
Expand Down

0 comments on commit 5e41037

Please sign in to comment.