This is an automated email from the ASF dual-hosted git repository. humbedooh pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git
commit 72e3a655ebdab24f15b913e5bc03a26bf0b7a0ce Author: Daniel Gruno <[email protected]> AuthorDate: Fri Dec 10 20:33:31 2021 +0100 refactor calls --- webui/js/source/listview-threaded.js | 5 ++--- webui/js/source/listview-treeview.js | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/webui/js/source/listview-threaded.js b/webui/js/source/listview-threaded.js index 1f9ad79..f5541ef 100644 --- a/webui/js/source/listview-threaded.js +++ b/webui/js/source/listview-threaded.js @@ -48,9 +48,8 @@ function listview_threaded(json, start) { } function find_email(id) { - let json = G_current_json; - if (!json.emails) return null; - for (let email of json.emails) { + if (!G_current_json.emails) return null; + for (let email of G_current_json.emails) { if (email.id == id) return email; } return null; diff --git a/webui/js/source/listview-treeview.js b/webui/js/source/listview-treeview.js index bcdde8c..fdfe17f 100644 --- a/webui/js/source/listview-treeview.js +++ b/webui/js/source/listview-treeview.js @@ -21,10 +21,10 @@ function listview_treeview(json, start) { let s = start || 0; let email_ordered = []; for (let thread of json.thread_struct) { - let eml = find_email(json, thread.tid); + let eml = find_email(thread.tid); if (eml) email_ordered.push(eml); for (let child of thread.children) { - let eml = find_email(json, child.tid); + let eml = find_email(child.tid); if (eml) email_ordered.push(eml); } }
