🎈 perf: 不渲染时,静默下载资源

This commit is contained in:
Rrrrrrray 2025-03-15 06:08:11 +08:00
parent 121652d431
commit 5ec9f7a6bd

View file

@ -8,7 +8,7 @@ import {
getPanelListOrigin, getPanelListOrigin,
} from '../lib/avatar.js'; } from '../lib/avatar.js';
import settings from '../lib/settings.js'; import settings from '../lib/settings.js';
import _ from 'lodash'; import _, { compact } from 'lodash';
import { rulePrefix } from '../lib/common.js'; import { rulePrefix } from '../lib/common.js';
export class Panel extends ZZZPlugin { export class Panel extends ZZZPlugin {
@ -161,8 +161,11 @@ export class Panel extends ZZZPlugin {
updatePanelData(uid, [data]); updatePanelData(uid, [data]);
} }
const timer = setTimeout(() => { const timer = setTimeout(() => {
if (this?.reply) { const msg = '查询成功,正在下载图片资源,请稍候。'
this.reply('查询成功,正在下载图片资源,请稍候。'); if (this?.reply && needImg) {
this.reply(msg);
} else {
logger.mark(msg)
} }
}, 5000); }, 5000);
const parsedData = formatPanelData(data); const parsedData = formatPanelData(data);