Commit c0da6d2b authored by martin hou's avatar martin hou

fix: 取消文件数量验证

parent c3543d65
......@@ -666,6 +666,7 @@ Jensen.prototype.listFiles = async function () {
let tag = 'filelist-' + this.serialNumber + '-' + this.sequence();
if (this[tag] != null) return null;
/*
let fc = null;
if (typeof this.versionNumber == 'undefined' || this.versionNumber <= 327722) {
fc = await this.getFileCount(5);
......@@ -673,6 +674,7 @@ Jensen.prototype.listFiles = async function () {
}
if (fc && fc.count == 0) return null;
*/
let self = this;
// let tag = 'data_' + new Date().getTime();
......@@ -793,26 +795,13 @@ Jensen.prototype.listFiles = async function () {
jensen[kv] = now;
if ((fc && files.length >= fc.count) || (fcount > -1 && files.length >= fcount)) {
// delete jensen[tag];
// 要怎么样触发这个回调?
jensen[kv] = window.setTimeout(() => {
console.log('remove tag: ' + tag);
jensen[tag] = null;
window.clearTimeout(jensen[kv]);
console.log('jensen', 'list-files', 'normal return');
return files.filter((f) => {
return Boolean(f.time);
});
}
else
{
// 要怎么样触发这个回调?
jensen[kv] = window.setTimeout(() => {
console.log('remove tag: ' + tag);
jensen[tag] = null;
jensen._trigger(files.filter((f) => { return Boolean(f.time); }), QUERY_FILE_LIST);
console.log('jensen', 'list-files', 'timed return');
}, 1000);
}
jensen._trigger(files.filter((f) => { return Boolean(f.time); }), QUERY_FILE_LIST);
console.log('jensen', 'list-files', 'timed return');
}, 1000);
});
return this.send(new Command(QUERY_FILE_LIST));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment