From 9581e3e49163df1584954ccd37b6fdc7be9fecca Mon Sep 17 00:00:00 2001 From: Matthias Bussonnier Date: Sat, 17 Jan 2015 23:48:28 +0100 Subject: [PATCH] Reload list after creating a new folder in promises. No need to reload session (I doubt creating a new folder create a session), and does it once the creation drive promise return which make the new directory appear in the listing for slow remote-backend (like google drive) --- IPython/html/static/tree/js/notebooklist.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/IPython/html/static/tree/js/notebooklist.js b/IPython/html/static/tree/js/notebooklist.js index d348e112f..10a937b24 100644 --- a/IPython/html/static/tree/js/notebooklist.js +++ b/IPython/html/static/tree/js/notebooklist.js @@ -82,8 +82,10 @@ define([ that.load_sessions(); }); $('#new-folder').click(function(e) { - that.contents.new_untitled(that.notebook_path || '', {type: 'directory'}); - that.load_sessions(); + that.contents.new_untitled(that.notebook_path || '', {type: 'directory'}) + .then(function(){ + that.load_list(); + }); }); } };