We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9b6aff1 commit edf7dbdCopy full SHA for edf7dbd
1 file changed
src/ui/TrashPalette.ts
@@ -73,13 +73,17 @@ export class TrashPalette {
73
74
// 配置按钮回调函数
75
quickPick.onDidTriggerButton(async (button) => {
76
- if (button === refreshButton) {
77
- refreshQuickPick(path);
78
- } else if (button === emptyTrashButton) {
79
- await this.#handleEmptyTrash(path);
80
81
- } else if (button === vscode.QuickInputButtons.Back) {
82
- this.show();
+ switch (button) {
+ case refreshButton:
+ refreshQuickPick(path);
+ break;
+ case emptyTrashButton:
+ await this.#handleEmptyTrash(path);
83
84
+ case vscode.QuickInputButtons.Back:
85
+ this.show();
86
87
} // HACK: 简单处理一下,这里的返回上级直接调用show()回到初始界面
88
});
89
0 commit comments