style: 移除老旧代码

This commit is contained in:
手瓜一十雪 2024-08-26 01:07:01 +08:00
parent 535720d0fe
commit f1b137f2e1
2 changed files with 4 additions and 27 deletions

View File

@ -1,27 +1,4 @@
interface IGlobalAdapter {
onLog(...args: unknown[]): void;
onGetSrvCalTime(...args: unknown[]): void;
onShowErrUITips(...args: unknown[]): void;
fixPicImgType(...args: unknown[]): void;
getAppSetting(...args: unknown[]): void;
onInstallFinished(...args: unknown[]): void;
onUpdateGeneralFlag(...args: unknown[]): void;
onGetOfflineMsg(...args: unknown[]): void;
}
export interface NodeIGlobalAdapter extends IGlobalAdapter {
// eslint-disable-next-line @typescript-eslint/no-misused-new
new(adapter: IGlobalAdapter): NodeIGlobalAdapter;
}
export class GlobalAdapter implements IGlobalAdapter {
export class NodeIGlobalAdapter {
onLog(...args: unknown[]) {
}

View File

@ -2,7 +2,7 @@ import type { SelfInfo } from '@/core/entities';
import { LogWrapper } from '@/common/utils/log';
import { LoginListener, NodeIKernelSessionListener } from '@/core/listeners';
import { NodeIDispatcherAdapter, GlobalAdapter, NodeIDependsAdapter } from '@/core/adapters';
import { NodeIDispatcherAdapter, NodeIDependsAdapter, NodeIGlobalAdapter } from '@/core/adapters';
import { NapCatPathWrapper } from '@/common/framework/napcat';
import {
InstanceContext,
@ -70,7 +70,7 @@ export async function NCoreInitShell() {
},
thumb_config: { maxSide: 324, minSide: 48, longLimit: 6, density: 2 },
},
new GlobalAdapter() as any,
new NodeIGlobalAdapter(),
);
loginService.initConfig({
machineId: '',
@ -190,7 +190,7 @@ export async function NCoreInitShell() {
logger.log(`可用于快速登录的 QQ\n${historyLoginList
.map((u, index) => `${index + 1}. ${u.uin} ${u.nickName}`)
.join('\n')
}`);
}`);
}
loginService.getQRCodePicture();
}