fix: properly update workspaces and buffers in tree view

This commit is contained in:
frelodev 2024-09-28 12:37:44 +02:00
parent 6b58243c91
commit 28f611ad86
2 changed files with 4 additions and 3 deletions

View file

@ -143,7 +143,7 @@ export async function createWorkspace() {
if (workspace_id === undefined) return; if (workspace_id === undefined) return;
await client.create_workspace(workspace_id); await client.create_workspace(workspace_id);
vscode.window.showInformationMessage("Created new workspace " + workspace_id); vscode.window.showInformationMessage("Created new workspace " + workspace_id);
provider.refresh(); listWorkspaces();
} }
export async function inviteToWorkspace() { export async function inviteToWorkspace() {

View file

@ -44,9 +44,10 @@ export async function jump(selected: vscode.TreeItem | undefined){
export async function createBuffer() { export async function createBuffer() {
let bufferName: any = (await vscode.window.showInputBox({ prompt: "path of the buffer to create" })); let bufferName: any = (await vscode.window.showInputBox({ prompt: "path of the buffer to create" }));
if (workspace === null) return vscode.window.showWarningMessage("Join a workspace first"); if (workspace === null) return vscode.window.showWarningMessage("Join a workspace first");
workspace.create(bufferName); await workspace.create(bufferName);
vscode.window.showInformationMessage(`new buffer created :${bufferName}`); vscode.window.showInformationMessage(`new buffer created :${bufferName}`);
provider.refresh(); listBuffers();
//provider.refresh();
} }
export async function listBuffers() { export async function listBuffers() {