mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
45727fce05
@ -2,3 +2,4 @@
|
||||
2. 支持了设置已读群/私聊消息接口
|
||||
3. 支持了好友添加上报事件
|
||||
4. 重构了商城表情URL拼接
|
||||
5. 重构了Core日志与服务调用部分
|
||||
|
@ -34,6 +34,7 @@ class MarkMsgAsRead extends BaseAction<Payload, null> {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
// 以下为非标准实现
|
||||
export class MarkPrivateMsgAsRead extends MarkMsgAsRead {
|
||||
actionName = ActionName.MarkPrivateMsgAsRead;
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ interface ReturnType {
|
||||
export default class CanSendRecord extends BaseAction<any, ReturnType> {
|
||||
actionName = ActionName.CanSendRecord;
|
||||
|
||||
protected async _handle(payload): Promise<ReturnType> {
|
||||
protected async _handle(_payload: void): Promise<ReturnType> {
|
||||
return {
|
||||
yes: true
|
||||
};
|
||||
|
@ -7,7 +7,7 @@ import {
|
||||
ChatCacheListItemBasic,
|
||||
CacheFileType
|
||||
} from '@/core/entities';
|
||||
import { dbUtil } from '../../../common/db';
|
||||
import { dbUtil } from '../../../common/utils/db';
|
||||
import { NTQQFileApi, NTQQFileCacheApi } from '@/core/apis/file';
|
||||
|
||||
export default class CleanCache extends BaseAction<void, void> {
|
||||
@ -23,7 +23,7 @@ export default class CleanCache extends BaseAction<void, void> {
|
||||
|
||||
cacheFilePaths.push((await NTQQFileCacheApi.getHotUpdateCachePath()));
|
||||
cacheFilePaths.push((await NTQQFileCacheApi.getDesktopTmpPath()));
|
||||
(await NTQQFileCacheApi.getCacheSessionPathList()).forEach(e => cacheFilePaths.push(e.value));
|
||||
(await NTQQFileCacheApi.getCacheSessionPathList()).forEach((e: { value: string; }) => cacheFilePaths.push(e.value));
|
||||
|
||||
// await NTQQApi.addCacheScannedPaths(); // XXX: 调用就崩溃,原因目前还未知
|
||||
const cacheScanResult = await NTQQFileCacheApi.scanCache();
|
||||
@ -55,7 +55,7 @@ export default class CleanCache extends BaseAction<void, void> {
|
||||
const fileTypeAny: any = CacheFileType[name];
|
||||
const fileType: CacheFileType = fileTypeAny;
|
||||
|
||||
cacheFileList.push(...(await NTQQFileCacheApi.getFileCacheInfo(fileType)).infos.map(file => file.fileKey));
|
||||
cacheFileList.push(...(await NTQQFileCacheApi.getFileCacheInfo(fileType)).infos.map((file: { fileKey: any; }) => file.fileKey));
|
||||
}
|
||||
|
||||
// 一并清除
|
||||
@ -89,17 +89,5 @@ function deleteCachePath(pathList: string[]) {
|
||||
|
||||
function getCacheList(type: ChatType) { // NOTE: 做这个方法主要是因为目前还不支持针对频道消息的清理
|
||||
return new Promise<Array<ChatCacheListItemBasic>>((res, rej) => {
|
||||
NTQQFileCacheApi.getChatCacheList(type, 1000, 0)
|
||||
.then(data => {
|
||||
const list = data.infos.filter(e => e.chatType === type && parseInt(e.basicChatCacheInfo.chatSize) > 0);
|
||||
const result = list.map(e => {
|
||||
const result = { ...e.basicChatCacheInfo };
|
||||
result.chatType = type;
|
||||
result.isChecked = true;
|
||||
return result;
|
||||
});
|
||||
res(result);
|
||||
})
|
||||
.catch(e => rej(e));
|
||||
});
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
export const version = '1.1.2';
|
||||
export const version = '1.2.0';
|
||||
|
Loading…
x
Reference in New Issue
Block a user