disabled page update when searching

This commit is contained in:
huangjx
2021-09-11 15:01:51 +08:00
parent 317873ad65
commit bf539e90b7

View File

@@ -70,6 +70,8 @@ const inputHandler = (event) => {
helper.message(t("ncdownloader", "YTDL Download initiated")); helper.message(t("ncdownloader", "YTDL Download initiated"));
} }
if (inputData.type === 'search') { 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(); nctable.getInstance().loading();
} }
const successCallback = (data, element) => { const successCallback = (data, element) => {
@@ -79,7 +81,6 @@ const inputHandler = (event) => {
} }
toggleButton(element); toggleButton(element);
if (data && data.title) { if (data && data.title) {
helper.enabledPolling = 0;
const tableInst = nctable.getInstance(data.title, data.row); const tableInst = nctable.getInstance(data.title, data.row);
tableInst.actionLink = false; tableInst.actionLink = false;
tableInst.rowClass = "table-row-search"; tableInst.rowClass = "table-row-search";