Skip to content

Commit

Permalink
[Modify] Check board name (#13)
Browse files Browse the repository at this point in the history
[Modify] Check board name
  • Loading branch information
Yukaii authored May 1, 2019
2 parents f40171d + 1080e95 commit f0e095e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,17 @@ export async function activate(context: vscode.ExtensionContext) {
placeHolder: 'C_Chat'
});

if (boardName){
const checkBoard = await ptt.enterBoard(boardName);
if (!checkBoard) {
vscode.window.showInformationMessage("此看板不存在");
return;
}
}
else{
return;
}

const boardlist: string[] = ctx.globalState.get('boardlist') || [];
const boards = [...new Set(boardlist.concat(boardName))];
ctx.globalState.update('boardlist', boards.filter(Boolean));
Expand Down

0 comments on commit f0e095e

Please # to comment.