Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ module.exports = {
'spaced-comment': ['error', 'always', { markers: ['!'] }],
'no-inline-comments': 'warn',
'no-console': 'warn',
'react-hooks/exhaustive-deps': 'warn',
'react-hooks/exhaustive-deps': 'error',
'react-native/no-inline-styles': 'error',
},
},
Expand Down
24 changes: 18 additions & 6 deletions App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ import AppErrorBoundary, {
} from '@components/AppErrorBoundary/AppErrorBoundary';
import { useInitDatabase } from '@database/db';
import { BottomSheetModalProvider } from '@gorhom/bottom-sheet';
import { useLibrarySettings,useSecuritySettings } from '@hooks/persisted/useSettings';
import {
useLibrarySettings,
useSecuritySettings,
} from '@hooks/persisted/useSettings';
import { ThemeProvider } from '@hooks/persisted/useTheme';
import { CloudflareSolverOverlay } from '@plugins/helpers/CloudflareSolverOverlay';
import { initLocalServer } from '@plugins/local/localServerManager';
Expand Down Expand Up @@ -48,7 +51,7 @@ const useScreenProtection = () => {

useEffect(() => {
try {
const {FlagSecure} = NativeModules;
const { FlagSecure } = NativeModules;
if (!FlagSecure) {
return;
}
Expand Down Expand Up @@ -84,11 +87,13 @@ const useCancelStuckBackupTasks = () => {
];

const hasStuckBackupTasks = taskList.some(
t => t?.task?.name && backupTasks.includes(t.task.name)
t => t?.task?.name && backupTasks.includes(t.task.name),
);

if (hasStuckBackupTasks) {
backupTasks.forEach(name => ServiceManager.manager.removeTasksByName(name as any));
backupTasks.forEach(name =>
ServiceManager.manager.removeTasksByName(name as any),
);
showToast(getString('backupLogScreen.incompleteBackupCancelled'));
}
}, []);
Expand All @@ -103,7 +108,7 @@ const AppContent = () => {
useEffect(() => {
const subscription = Notifications.addNotificationResponseReceivedListener(
async response => {
const {data} = response.notification.request.content;
const { data } = response.notification.request.content;
if (data?.action === 'open_update_error_log' && data?.filePath) {
try {
const cleanPath = (data.filePath as string).replace('file://', '');
Expand Down Expand Up @@ -147,6 +152,10 @@ const App = () => {
}
}, [state.success, state.error]);

if (!state.success && !state.error) {
return null;
}

return (
<Suspense fallback={null}>
<GestureHandlerRootView style={styles.flex}>
Expand All @@ -160,7 +169,10 @@ const App = () => {
<AppErrorBoundary>
<PaperProvider>
<BottomSheetModalProvider>
<StatusBar translucent={true} backgroundColor="transparent" />
<StatusBar
translucent={true}
backgroundColor="transparent"
/>
<AppContent />
</BottomSheetModalProvider>
</PaperProvider>
Expand Down
2 changes: 2 additions & 0 deletions __mocks__/database.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ jest.mock('@database/queries/ChapterQueries', () => ({
getNovelChaptersSync: jest.fn(),
getFirstUnreadChapter: jest.fn(),
updateChapterProgress: jest.fn(),
getNovelScanlators: jest.fn(() => []),
getNovelScanlatorsSync: jest.fn(() => []),
}));

jest.mock('@database/queries/HistoryQueries', () => ({
Expand Down
1 change: 1 addition & 0 deletions drizzle/20260716072509_faithful_marvex/migration.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE `Chapter` ADD `scanlator` text;
Loading
Loading