Skip to content

Commit aed2545

Browse files
committed
show project overlay upon delete, show notification upon delete success
1 parent cb6af13 commit aed2545

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/plugins/handlers.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,10 @@ function handlers(app, opts, done){
234234

235235
const dirpath = path.join('/', projectName);
236236

237-
workspace.deleteDirectory(dirpath);
237+
workspace.deleteDirectory(dirpath)
238+
.finally(function(){
239+
showProjectsOverlay();
240+
});
238241
}
239242

240243
function deleteProjectConfirm(name){

src/plugins/notifications.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ function notifications({ workspace, toast }, opts, done){
2020
DELETE_FILE_SUCCESS,
2121
DELETE_FILE_FAILURE,
2222
CHANGE_FILE_FAILURE,
23+
DELETE_DIRECTORY_SUCCESS,
2324
DELETE_DIRECTORY_FAILURE,
2425
CHANGE_DIRECTORY_FAILURE
2526
} = workspace.STATUS_CONSTANTS;
@@ -30,6 +31,7 @@ function notifications({ workspace, toast }, opts, done){
3031
switch(status){
3132
case SAVE_FILE_SUCCESS:
3233
case DELETE_FILE_SUCCESS:
34+
case DELETE_DIRECTORY_SUCCESS:
3335
toast.show(notification, { style: styles.successToast, timeout: 5000 });
3436
break;
3537
case SAVE_FILE_FAILURE:

0 commit comments

Comments
 (0)