test_client: modify for new fersion of "file_list_changed" notification

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Arksine 2020-07-26 20:06:26 -04:00 committed by Eric Callahan
parent b6f8ba775c
commit ad127ce2a9
1 changed files with 4 additions and 2 deletions

View File

@ -610,8 +610,10 @@ json_rpc.register_method("notify_klippy_state_changed", handle_klippy_state);
function handle_file_list_changed(file_info) {
// This event fires when a client has either added or removed
// a gcode file.
if (file_list_type == "gcodes")
update_filelist(file_info.filelist);
if (file_list_type == file_info.root)
get_file_list(file_info.root);
console.log("Filelist Changed:");
console.log(file_info);
}
json_rpc.register_method("notify_filelist_changed", handle_file_list_changed);