提交 7fccb0d6 编写于 作者: R rebornix

use updateState/compute instead of sending delta directly.

上级 c2131f98
......@@ -171,8 +171,9 @@ export class MainThreadNotebooks extends Disposable implements MainThreadNoteboo
this._addNotebookEditor(editor);
}));
this._register(this._notebookService.onNotebookEditorRemove(editor => {
this._removeNotebookEditor(editor);
this._register(this._notebookService.onNotebookDocumentRemove(() => {
this._updateState();
}));
const updateOrder = () => {
......@@ -201,9 +202,7 @@ export class MainThreadNotebooks extends Disposable implements MainThreadNoteboo
}
async addNotebookDocument(data: INotebookModelAddedData) {
await this._proxy.$acceptDocumentAndEditorsDelta({
addedDocuments: [data]
});
this._updateState();
}
private _addNotebookEditor(e: IEditor) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册