mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-16 09:58:13 +08:00
🚨 修复 qodana 报错
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* @file plugins/Sqlite/index.ts
|
* @file plugins/Sqlite/index.ts
|
||||||
* @description Sqlite 数据库操作类
|
* @description Sqlite 数据库操作类
|
||||||
* @since Beta v0.3.9
|
* @since Beta v0.4.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { app } from "@tauri-apps/api";
|
import { app } from "@tauri-apps/api";
|
||||||
@@ -186,15 +186,17 @@ class Sqlite {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 重置数据库
|
* @description 重置数据库
|
||||||
* @since Beta v0.3.3
|
* @since Beta v0.4.0
|
||||||
* @returns {Promise<void>}
|
* @returns {Promise<void>}
|
||||||
*/
|
*/
|
||||||
public async reset(): Promise<void> {
|
public async reset(): Promise<void> {
|
||||||
const db = await this.getDB();
|
const db = await this.getDB();
|
||||||
this.tables.map(async (item) => {
|
await Promise.all(
|
||||||
const sql = `DROP TABLE IF EXISTS ${item};`;
|
this.tables.map(async (item) => {
|
||||||
await db.execute(sql);
|
const sql = `DROP TABLE IF EXISTS ${item};`;
|
||||||
});
|
await db.execute(sql);
|
||||||
|
}),
|
||||||
|
);
|
||||||
await this.initDB();
|
await this.initDB();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ class TGClient {
|
|||||||
* @returns {Promise<void>} - 返回值
|
* @returns {Promise<void>} - 返回值
|
||||||
*/
|
*/
|
||||||
async handleCallback(arg: Event<string>): Promise<void> {
|
async handleCallback(arg: Event<string>): Promise<void> {
|
||||||
const argParse: TGApp.Plugins.JSBridge.Arg<any> = JSON.parse(<string>arg.payload);
|
const argParse: TGApp.Plugins.JSBridge.Arg<any> = JSON.parse(arg.payload);
|
||||||
if (argParse.method.startsWith("teyvat")) {
|
if (argParse.method.startsWith("teyvat")) {
|
||||||
await this.handleCustomCallback(argParse);
|
await this.handleCustomCallback(argParse);
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user