fix: type errors

* fix app.tsx

* fix InfoItem

* fix helpers

* fix webview ref

* fix MoreScreen

* fix NovelScreenButtonGroup

* fix ReaderScreen

* fix readerTextAlignSelector

* fix ReaderValueChange

* fix UpdateNovelCard

* fix myAnimeList

* fixed legacy backup

* fix migrateNovel
This commit is contained in:
Patrick Loser
2025-05-08 22:39:02 +02:00
committed by GitHub
parent f90a4d1103
commit c487bd2ca6
20 changed files with 94 additions and 67 deletions
+4 -1
View File
@@ -78,11 +78,14 @@ export const getNovelById = async (novelId: number) => {
export const getNovelByPath = (
novelPath: string,
pluginId: string,
): NovelInfo | null => {
): NovelInfo | undefined => {
const res = getFirstSync<NovelInfo>([
'SELECT * FROM Novel WHERE path = ? AND pluginId = ?',
[novelPath, pluginId],
]);
if (!res) {
return undefined;
}
return res;
};
+2 -1
View File
@@ -90,7 +90,8 @@ export function getFirstSync<T = unknown>(queryObject: QueryObject<T>) {
return defaultQuerySync<T, false>('getFirstSync', queryObject, null);
}
type TransactionObject = [query, ...params: SQLiteBindValue[]];
type params = SQLiteBindValue[];
type TransactionObject = [query, ...params];
export async function transactionAsync(transactionObject: TransactionObject[]) {
await db.withTransactionAsync(async () => {