From bf539e90b76a74145246e33f08876d9cc21419dc Mon Sep 17 00:00:00 2001 From: huangjx Date: Sat, 11 Sep 2021 15:01:51 +0800 Subject: [PATCH] disabled page update when searching --- src/inputAction.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/inputAction.js b/src/inputAction.js index 9b246ac..fff3c84 100644 --- a/src/inputAction.js +++ b/src/inputAction.js @@ -70,6 +70,8 @@ const inputHandler = (event) => { helper.message(t("ncdownloader", "YTDL Download initiated")); } if (inputData.type === 'search') { + //there is a scheduled 60s-interval update running in the background, this is to prevent it from running when searching + helper.enabledPolling = 0; nctable.getInstance().loading(); } const successCallback = (data, element) => { @@ -79,7 +81,6 @@ const inputHandler = (event) => { } toggleButton(element); if (data && data.title) { - helper.enabledPolling = 0; const tableInst = nctable.getInstance(data.title, data.row); tableInst.actionLink = false; tableInst.rowClass = "table-row-search";