From 1b10252d765bd4f6b6e44579cf3354c03b935554 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Tue, 10 Sep 2024 18:42:49 +0800 Subject: [PATCH] remove: NTQQCacheApi --- src/core/apis/cache.ts | 63 ------------------------------------------ src/core/apis/index.ts | 3 +- 2 files changed, 1 insertion(+), 65 deletions(-) delete mode 100644 src/core/apis/cache.ts diff --git a/src/core/apis/cache.ts b/src/core/apis/cache.ts deleted file mode 100644 index 64bdddd0..00000000 --- a/src/core/apis/cache.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { - CacheFileListItem, - CacheFileType, - ChatCacheListItemBasic, - ChatType, - InstanceContext, - NapCatCore, -} from '@/core'; - -export class NTQQCacheApi { - context: InstanceContext; - core: NapCatCore; - - constructor(context: InstanceContext, core: NapCatCore) { - this.context = context; - this.core = core; - } - - async setCacheSilentScan(isSilent: boolean = true) { - return ''; - } - - getCacheSessionPathList() { - return ''; - } - - clearCache(cacheKeys: Array = ['tmp', 'hotUpdate']) { - // 参数未验证 - return this.context.session.getStorageCleanService().clearCacheDataByKeys(cacheKeys); - } - - addCacheScannedPaths(pathMap: object = {}) { - return this.context.session.getStorageCleanService().addCacheScanedPaths(pathMap); - } - - scanCache() { - //return (await this.context.session.getStorageCleanService().scanCache()).size; - } - - getHotUpdateCachePath() { - // 未实现 - return ''; - } - - getDesktopTmpPath() { - // 未实现 - return ''; - } - - getChatCacheList(type: ChatType, pageSize: number = 1000, pageIndex: number = 0) { - return this.context.session.getStorageCleanService().getChatCacheInfo(type, pageSize, 1, pageIndex); - } - - getFileCacheInfo(fileType: CacheFileType, pageSize: number = 1000, lastRecord?: CacheFileListItem) { - // const _lastRecord = lastRecord ? lastRecord : { fileType: fileType }; - // 需要五个参数 - // return napCatCore.session.getStorageCleanService().getFileCacheInfo(); - } - - async clearChatCache(chats: ChatCacheListItemBasic[] = [], fileKeys: string[] = []) { - return this.context.session.getStorageCleanService().clearChatCacheInfo(chats, fileKeys); - } -} diff --git a/src/core/apis/index.ts b/src/core/apis/index.ts index 19b444dc..4c0619e3 100644 --- a/src/core/apis/index.ts +++ b/src/core/apis/index.ts @@ -5,5 +5,4 @@ export * from './msg'; export * from './user'; export * from './webapi'; export * from './sign'; -export * from './system'; -export * from './cache'; +export * from './system'; \ No newline at end of file