This commit is contained in:
rebornix
2020-10-07 15:26:52 -07:00
parent 937b30edf2
commit 59f0af3bec
6 changed files with 31 additions and 31 deletions

View File

@@ -144,7 +144,7 @@ export type CommentThreadChanges = Partial<{
contextValue: string,
comments: modes.Comment[],
collapseState: modes.CommentThreadCollapsibleState;
readOnly: boolean;
canReply: boolean;
}>;
export interface MainThreadCommentsShape extends IDisposable {

View File

@@ -219,7 +219,7 @@ type CommentThreadModification = Partial<{
contextValue: string | undefined,
comments: vscode.Comment[],
collapsibleState: vscode.CommentThreadCollapsibleState
readOnly: boolean;
canReply: boolean;
}>;
export class ExtHostCommentThread implements vscode.CommentThread {
@@ -264,17 +264,17 @@ export class ExtHostCommentThread implements vscode.CommentThread {
return this._range;
}
private _readonly: boolean = false;
private _canReply: boolean = true;
set readOnly(state: boolean) {
if (this._readonly !== state) {
this._readonly = state;
this.modifications.readOnly = state;
set canReply(state: boolean) {
if (this._canReply !== state) {
this._canReply = state;
this.modifications.canReply = state;
this._onDidUpdateCommentThread.fire();
}
}
get readOnly() {
return this._readonly;
get canReply() {
return this._canReply;
}
private _label: string | undefined;
@@ -401,8 +401,8 @@ export class ExtHostCommentThread implements vscode.CommentThread {
if (modified('collapsibleState')) {
formattedModifications.collapseState = convertToCollapsibleState(this._collapseState);
}
if (modified('readOnly')) {
formattedModifications.readOnly = this.readOnly;
if (modified('canReply')) {
formattedModifications.canReply = this.canReply;
}
this.modifications = {};