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 type OnBuddyChangeParams = BuddyCategoryType[];
|
||||||
|
|
||||||
export class NodeIKernelBuddyListener {
|
export class NodeIKernelBuddyListener {
|
||||||
onBuddyListChangedV2(arg: unknown): void {
|
onBuddyListChangedV2(arg: unknown): any {
|
||||||
}
|
}
|
||||||
|
|
||||||
onAddBuddyNeedVerify(arg: unknown): any {
|
onAddBuddyNeedVerify(arg: unknown): any {
|
||||||
@@ -24,36 +24,36 @@ export class NodeIKernelBuddyListener {
|
|||||||
onBuddyInfoChange(arg: unknown): any {
|
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([]);
|
// session.getUnitedConfigService().fetchUnitedCommendConfig([]);
|
||||||
// }
|
// }
|
||||||
// from initSession
|
// from initSession
|
||||||
await new Promise<void>(async (resolve, reject) => {
|
|
||||||
const sessionConfig = await genSessionConfig(
|
const sessionConfig = await genSessionConfig(
|
||||||
guid,
|
guid,
|
||||||
basicInfoWrapper.QQVersionAppid!,
|
basicInfoWrapper.QQVersionAppid!,
|
||||||
@@ -262,12 +261,13 @@ export async function NCoreInitShell() {
|
|||||||
selfInfo.uid,
|
selfInfo.uid,
|
||||||
dataPath,
|
dataPath,
|
||||||
);
|
);
|
||||||
|
await new Promise<void>((resolve, reject) => {
|
||||||
const sessionListener = new NodeIKernelSessionListener();
|
const sessionListener = new NodeIKernelSessionListener();
|
||||||
sessionListener.onSessionInitComplete = (r: unknown) => {
|
sessionListener.onSessionInitComplete = (r: unknown) => {
|
||||||
if (r === 0) {
|
if (r === 0) {
|
||||||
resolve();
|
resolve();
|
||||||
} else {
|
} else {
|
||||||
reject(r);
|
reject(new Error('登录异常' + r?.toString()));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
session.init(
|
session.init(
|
||||||
@@ -281,8 +281,8 @@ export async function NCoreInitShell() {
|
|||||||
} catch (_) { /* Empty */
|
} catch (_) { /* Empty */
|
||||||
try {
|
try {
|
||||||
session.startNT();
|
session.startNT();
|
||||||
} catch (e) {
|
} catch (e: unknown) {
|
||||||
reject('init failed ' + e);
|
reject(new Error('init failed ' + (e as Error).message));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user