mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
fix
This commit is contained in:
@@ -3,7 +3,7 @@ import { BuddyCategoryType, FriendRequestNotify } from '@/core/entities';
|
||||
export type OnBuddyChangeParams = BuddyCategoryType[];
|
||||
|
||||
export class NodeIKernelBuddyListener {
|
||||
onBuddyListChangedV2(arg: unknown): void {
|
||||
onBuddyListChangedV2(arg: unknown): any {
|
||||
}
|
||||
|
||||
onAddBuddyNeedVerify(arg: unknown): any {
|
||||
@@ -24,36 +24,36 @@ export class NodeIKernelBuddyListener {
|
||||
onBuddyInfoChange(arg: unknown): any {
|
||||
}
|
||||
|
||||
onBuddyListChange(arg: OnBuddyChangeParams): void {
|
||||
onBuddyListChange(arg: OnBuddyChangeParams): any {
|
||||
}
|
||||
|
||||
onBuddyRemarkUpdated(arg: unknown): void {
|
||||
onBuddyRemarkUpdated(arg: unknown): any {
|
||||
}
|
||||
|
||||
onBuddyReqChange(arg: FriendRequestNotify): void {
|
||||
onBuddyReqChange(arg: FriendRequestNotify): any {
|
||||
}
|
||||
|
||||
onBuddyReqUnreadCntChange(arg: unknown): void {
|
||||
onBuddyReqUnreadCntChange(arg: unknown): any {
|
||||
}
|
||||
|
||||
onCheckBuddySettingResult(arg: unknown): void {
|
||||
onCheckBuddySettingResult(arg: unknown): any {
|
||||
}
|
||||
|
||||
onDelBatchBuddyInfos(arg: unknown): void {
|
||||
onDelBatchBuddyInfos(arg: unknown): any {
|
||||
}
|
||||
|
||||
onDoubtBuddyReqChange(arg: unknown): void {
|
||||
onDoubtBuddyReqChange(arg: unknown): any {
|
||||
}
|
||||
|
||||
onDoubtBuddyReqUnreadNumChange(arg: unknown): void {
|
||||
onDoubtBuddyReqUnreadNumChange(arg: unknown): any {
|
||||
}
|
||||
|
||||
onNickUpdated(arg: unknown): void {
|
||||
onNickUpdated(arg: unknown): any {
|
||||
}
|
||||
|
||||
onSmartInfos(arg: unknown): void {
|
||||
onSmartInfos(arg: unknown): any {
|
||||
}
|
||||
|
||||
onSpacePermissionInfos(arg: unknown): void {
|
||||
onSpacePermissionInfos(arg: unknown): any {
|
||||
}
|
||||
}
|
||||
|
@@ -253,7 +253,6 @@ export async function NCoreInitShell() {
|
||||
// session.getUnitedConfigService().fetchUnitedCommendConfig([]);
|
||||
// }
|
||||
// from initSession
|
||||
await new Promise<void>(async (resolve, reject) => {
|
||||
const sessionConfig = await genSessionConfig(
|
||||
guid,
|
||||
basicInfoWrapper.QQVersionAppid!,
|
||||
@@ -262,12 +261,13 @@ export async function NCoreInitShell() {
|
||||
selfInfo.uid,
|
||||
dataPath,
|
||||
);
|
||||
await new Promise<void>((resolve, reject) => {
|
||||
const sessionListener = new NodeIKernelSessionListener();
|
||||
sessionListener.onSessionInitComplete = (r: unknown) => {
|
||||
if (r === 0) {
|
||||
resolve();
|
||||
} else {
|
||||
reject(r);
|
||||
reject(new Error('登录异常' + r?.toString()));
|
||||
}
|
||||
};
|
||||
session.init(
|
||||
@@ -281,8 +281,8 @@ export async function NCoreInitShell() {
|
||||
} catch (_) { /* Empty */
|
||||
try {
|
||||
session.startNT();
|
||||
} catch (e) {
|
||||
reject('init failed ' + e);
|
||||
} catch (e: unknown) {
|
||||
reject(new Error('init failed ' + (e as Error).message));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user