Skip to content

Commit

Permalink
Use modal for deletion (Fixes #11)
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerLeonhardt committed May 1, 2021
1 parent 3dda7d4 commit 838ba29
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/commands/listOperations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export class ListOperations extends vscode.Disposable {

const tasksFormatted = lists ? `${lists.map(t => t.entity.displayName).join('", "')}` : list.entity.displayName;
const choice = await vscode.window.showWarningMessage(
`"${tasksFormatted}" will be permanently deleted. You won't be able to undo this action.`,
`"${tasksFormatted}" will be permanently deleted. You won't be able to undo this action.`, { modal: true },
expected, 'Cancel');

if (choice !== expected) {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/taskOperations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export class TaskOperations extends vscode.Disposable {

const tasksFormatted = tasks ? `${tasks.map(t => t.entity.title).join('", "')}` : task.entity.title;
const choice = await vscode.window.showWarningMessage(
`"${tasksFormatted}" will be permanently deleted. You won't be able to undo this action.`,
`"${tasksFormatted}" will be permanently deleted. You won't be able to undo this action.`, { modal: true },
expected, 'Cancel');

if (choice !== expected) {
Expand Down

0 comments on commit 838ba29

Please sign in to comment.