mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
chore: remove debug
This commit is contained in:
parent
efb2be2f94
commit
8bf1a545d9
@ -37,7 +37,7 @@ setTimeout(() => {
|
|||||||
|
|
||||||
// const sendMessagePool: Record<string, ((sendSuccessMsg: RawMessage) => void | Promise<void>) | null> = {};// peerUid: callbackFunc
|
// const sendMessagePool: Record<string, ((sendSuccessMsg: RawMessage) => void | Promise<void>) | null> = {};// peerUid: callbackFunc
|
||||||
|
|
||||||
const sendSuccessCBMap: Record<string, ((sendSuccessMsg: RawMessage) => boolean | Promise<boolean>) | null> = {};// uuid: callbackFunc
|
// const sendSuccessCBMap: Record<string, ((sendSuccessMsg: RawMessage) => boolean | Promise<boolean>) | null> = {};// uuid: callbackFunc
|
||||||
|
|
||||||
const GroupFileInfoUpdateTasks: Map<string, ((groupFileListResult: onGroupFileInfoUpdateParamType) => void)> = new Map();
|
const GroupFileInfoUpdateTasks: Map<string, ((groupFileListResult: onGroupFileInfoUpdateParamType) => void)> = new Map();
|
||||||
|
|
||||||
@ -66,26 +66,26 @@ msgListener.onGroupFileInfoUpdate = (groupFileListResult: onGroupFileInfoUpdateP
|
|||||||
// }
|
// }
|
||||||
// };
|
// };
|
||||||
|
|
||||||
msgListener.onMsgInfoListUpdate = (msgInfoList: RawMessage[]) => {
|
// msgListener.onMsgInfoListUpdate = (msgInfoList: RawMessage[]) => {
|
||||||
msgInfoList.forEach(msg => {
|
// msgInfoList.forEach(msg => {
|
||||||
new Promise((resolve, reject) => {
|
// new Promise((resolve, reject) => {
|
||||||
for (const cbId in sendSuccessCBMap) {
|
// for (const cbId in sendSuccessCBMap) {
|
||||||
const cb = sendSuccessCBMap[cbId]!;
|
// const cb = sendSuccessCBMap[cbId]!;
|
||||||
const cbResult = cb(msg);
|
// const cbResult = cb(msg);
|
||||||
const checkResult = (result: boolean) => {
|
// const checkResult = (result: boolean) => {
|
||||||
if (result) {
|
// if (result) {
|
||||||
delete sendSuccessCBMap[cbId];
|
// delete sendSuccessCBMap[cbId];
|
||||||
}
|
// }
|
||||||
};
|
// };
|
||||||
if (cbResult instanceof Promise) {
|
// if (cbResult instanceof Promise) {
|
||||||
cbResult.then(checkResult);
|
// cbResult.then(checkResult);
|
||||||
} else {
|
// } else {
|
||||||
checkResult(cbResult);
|
// checkResult(cbResult);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}).then().catch(log);
|
// }).then().catch(log);
|
||||||
});
|
// });
|
||||||
};
|
// };
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user