From 82fbee2bc086688cf668a4ded4e0bfeb278b806c Mon Sep 17 00:00:00 2001 From: Arksine Date: Mon, 10 Aug 2020 17:48:15 -0400 Subject: [PATCH] test client: Update to handle new file list notification Signed-off-by: Eric Callahan --- test/client/js/main.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/client/js/main.js b/test/client/js/main.js index 874f3d2..82e0948 100644 --- a/test/client/js/main.js +++ b/test/client/js/main.js @@ -286,6 +286,9 @@ function get_klippy_info() { }) .catch((error) => { update_error(api.printer_info.method, error); + setTimeout(() => { + get_klippy_info(); + }, 2000); }); } @@ -594,8 +597,8 @@ 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 == file_info.root) - get_file_list(file_info.root); + if (file_list_type == file_info.item.root) + get_file_list(file_info.item.root); console.log("Filelist Changed:"); console.log(file_info); }