+
@@ -55,8 +55,8 @@ export default function Error({ error, reset }: ErrorPageProps) {
{error.message}
{browserInfo &&
Browser: {browserInfo}
}
{error.stack && (
-
- {error.stack.split('\n').slice(0, 5).join('\n')}
+
+ {error.stack.split('\n').slice(0, 3).join('\n')}
)}
{error.digest &&
Error ID: {error.digest}
}
diff --git a/apps/readest-app/src/app/library/components/BookItem.tsx b/apps/readest-app/src/app/library/components/BookItem.tsx
index dd3850ca..14e499b5 100644
--- a/apps/readest-app/src/app/library/components/BookItem.tsx
+++ b/apps/readest-app/src/app/library/components/BookItem.tsx
@@ -102,6 +102,10 @@ const BookItem: React.FC
= ({
{book.progress &&
}
diff --git a/apps/readest-app/src/app/library/page.tsx b/apps/readest-app/src/app/library/page.tsx
index 9601542f..00962f9f 100644
--- a/apps/readest-app/src/app/library/page.tsx
+++ b/apps/readest-app/src/app/library/page.tsx
@@ -401,8 +401,14 @@ const LibraryPageContent = ({ searchParams }: { searchParams: ReadonlyURLSearchP
};
const selectFilesTauri = async () => {
- const exts = appService?.isAndroidApp ? [] : SUPPORTED_FILE_EXTS;
+ const exts = appService?.isMobileApp ? [] : SUPPORTED_FILE_EXTS;
const files = (await appService?.selectFiles(_('Select Books'), exts)) || [];
+ if (appService?.isIOSApp) {
+ return files.filter((file) => {
+ const fileExt = file.split('.').pop()?.toLowerCase() || 'unknown';
+ return SUPPORTED_FILE_EXTS.includes(fileExt);
+ });
+ }
// Cannot filter out files on Android since some content providers may not return the file name
return files;
};
@@ -525,11 +531,7 @@ const LibraryPageContent = ({ searchParams }: { searchParams: ReadonlyURLSearchP
let files;
if (isTauriAppPlatform()) {
- if (appService?.isIOSApp) {
- files = (await selectFilesWeb()) as [File];
- } else {
- files = (await selectFilesTauri()) as [string];
- }
+ files = (await selectFilesTauri()) as [string];
} else {
files = (await selectFilesWeb()) as [File];
}
diff --git a/apps/readest-app/src/hooks/useTheme.ts b/apps/readest-app/src/hooks/useTheme.ts
index 5dba107a..6adb393e 100644
--- a/apps/readest-app/src/hooks/useTheme.ts
+++ b/apps/readest-app/src/hooks/useTheme.ts
@@ -80,10 +80,10 @@ export const useTheme = ({
}
};
document.addEventListener('visibilitychange', handleVisibilityChange);
- screen.orientation.addEventListener('change', handleOrientationChange);
+ screen.orientation?.addEventListener('change', handleOrientationChange);
return () => {
document.removeEventListener('visibilitychange', handleVisibilityChange);
- screen.orientation.removeEventListener('change', handleOrientationChange);
+ screen.orientation?.removeEventListener('change', handleOrientationChange);
};
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [handleSystemUIVisibility]);