From: Damyan Ivanov Date: Fri, 4 Mar 2022 20:52:05 +0000 (+0000) Subject: select newly created list X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=afed6d36c910279388c58c1596389971a18b55f0;p=lsl.git select newly created list --- 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; }