From caaf1e8d0ddfc0070f6ea22abddac9883aaf952f Mon Sep 17 00:00:00 2001 From: xuncha <1658671838@qq.com> Date: Sun, 15 Mar 2026 18:31:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AF=BC=E5=85=A5=E5=88=B0?= =?UTF-8?q?=E7=94=B5=E8=84=91=E4=B8=8A=E7=9A=84=E5=9B=BE=E7=89=87=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E8=A7=A3=E5=AF=86=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- electron/services/imageDecryptService.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/electron/services/imageDecryptService.ts b/electron/services/imageDecryptService.ts index a78b7ed..9ad2c25 100644 --- a/electron/services/imageDecryptService.ts +++ b/electron/services/imageDecryptService.ts @@ -436,6 +436,10 @@ export class ImageDecryptService { if (imageMd5) { const res = await this.fastProbabilisticSearch(join(accountDir, 'msg', 'attach'), imageMd5, allowThumbnail) if (res) return res + if (imageDatName && imageDatName !== imageMd5 && this.looksLikeMd5(imageDatName)) { + const datNameRes = await this.fastProbabilisticSearch(join(accountDir, 'msg', 'attach'), imageDatName, allowThumbnail) + if (datNameRes) return datNameRes + } } // 2. 如果 imageDatName 看起来像 MD5,也尝试快速定位 @@ -889,7 +893,8 @@ export class ImageDecryptService { const now = new Date() const months: string[] = [] - for (let i = 0; i < 2; i++) { + // Imported mobile history can live in older YYYY-MM buckets; keep this bounded but wider than "recent 2 months". + for (let i = 0; i < 24; i++) { const d = new Date(now.getFullYear(), now.getMonth() - i, 1) const mStr = `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, '0')}` months.push(mStr)