mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-06 13:05:09 +00:00
chore: Todo
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user