feat: 优化 Windows 缓存加载和图片显示

This commit is contained in:
电摇小子
2026-07-14 11:07:35 +08:00
committed by 电摇小子
parent ad50939005
commit a776830144
12 changed files with 663 additions and 93 deletions
+8 -3
View File
@@ -1,4 +1,4 @@
import { Wcdb4Client } from './wcdb4-client'
import { Wcdb4Client, Wcdb4MessageQueryOptions } from './wcdb4-client'
export interface UserContact {
m_nsUsrName: string
@@ -146,10 +146,15 @@ export class WechatDb {
this.wcdb4Client.close()
}
public getUserMessages(userMd5: string, startTime?: number, endTime?: number): WechatMessage[] {
public getUserMessages(
userMd5: string,
startTime?: number,
endTime?: number,
options?: Wcdb4MessageQueryOptions
): WechatMessage[] {
const username = this.chatMd5ToUsername.get(userMd5)
if (!username) return []
return this.wcdb4Client.getMessages(username, startTime, endTime).map((message) => ({
return this.wcdb4Client.getMessages(username, startTime, endTime, options).map((message) => ({
...message,
...message.raw
}))