chore: Todo

This commit is contained in:
手瓜一十雪
2024-08-04 15:12:55 +08:00
parent 998e615272
commit 6df14cf2cd
4 changed files with 11 additions and 6 deletions

View File

@@ -4,10 +4,10 @@ import { NTEventDispatch } from '@/common/utils/EventTask';
export class NTQQFriendApi {
static async getBuddyV2(refresh = false) {
NTEventDispatch.RegisterListen<NodeIKernelBuddyListener['onBuddyListChange']>('NodeIKernelBuddyListener/onBuddyListChange', 1, 5000, (arg: OnBuddyChangeParams) => {
console.log(arg);
return true;
}).catch().then();
// NTEventDispatch.RegisterListen<NodeIKernelBuddyListener['onBuddyListChange']>('NodeIKernelBuddyListener/onBuddyListChange', 1, 5000, (arg: OnBuddyChangeParams) => {
// console.log(arg);
// return true;
// }).catch().then();
if (!refresh) {
return await napCatCore.session.getBuddyService().getBuddyListFromCache('0');
}

View File

@@ -3,6 +3,8 @@ import { BuddyCategoryType, FriendRequestNotify } from '@/core/entities';
export type OnBuddyChangeParams = BuddyCategoryType[]
interface IBuddyListener {
onBuddyListChangedV2(arg: unknown): void,//V2版本 还没兼容
onBuddyListChange(arg: OnBuddyChangeParams): void,
onBuddyInfoChange(arg: unknown): void,
@@ -44,6 +46,9 @@ export interface NodeIKernelBuddyListener extends IBuddyListener {
}
export class BuddyListener implements IBuddyListener {
onBuddyListChangedV2(arg: unknown): void {
//throw new Error('Method not implemented.');
}
onAddBuddyNeedVerify(arg: unknown) {
}