X-Git-Url: https://git.ktnx.net/?a=blobdiff_plain;f=public%2Fjavascripts%2Flsl.js;h=4395c05ba1d33b1d4cfa071fc79eded548784806;hb=afed6d36c910279388c58c1596389971a18b55f0;hp=3e5c6725724b5600d440e6bc305cb58f34d56d42;hpb=e199c9073972c4fc2881236bd3ef70b1fd0ea101;p=lsl.git diff --git a/public/javascripts/lsl.js b/public/javascripts/lsl.js index 3e5c672..4395c05 100644 --- a/public/javascripts/lsl.js +++ b/public/javascripts/lsl.js @@ -154,7 +154,7 @@ function delete_list(li, dlg) { }); } function load_lists() { - $.get(uri_base + '/api/v1/list') + return $.get(uri_base + '/api/v1/list') .always(()=>{ var splash = $('#splash'); if (splash.length) { @@ -216,7 +216,12 @@ function load_lists() { } function new_list_submission_done(data) { if (data.lists_version != lists_version) { - load_lists(); + load_lists() + .done((d)=>{ + var new_list = $('li#list-'+uri_id(data.uri)); + if (new_list.length) + select_list(new_list); + }); return; }