INNER CODE UNIT · JavaScript
startAutoRefresh
AscensionGameDev/Intersect-Engine · Intersect.Server/wwwroot/js/assets.js:532
const startAutoRefresh = () => {
const autoRefreshInterval = this.#autoRefreshInterval;
if (this.#refreshTimeout !== 0 || !this.#visible || autoRefreshInterval === null) {
return;
}
this.#refreshTimeout = setTimeout(async () => {
if (!this.#visible) {
clearTimeout(this.#refreshTimeout);
return;
}
const nodes = this.#filterTree(
this.#tree,
node => node.Type === 'Directory'
);
const pathsToUpdate = nodes.map(({ Path }) => Path);
await this.#loadNodes(pathsToUpdate);