Skip to content

Commit 3f28e0d

Browse files
committed
fix merge issues
1 parent 68ddbe9 commit 3f28e0d

72 files changed

Lines changed: 735 additions & 2415 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

App.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ import Main from './src/navigators/Main';
2020
import { BottomSheetModalProvider } from '@gorhom/bottom-sheet';
2121
import { Providers } from './src/providers/Providers';
2222

23+
declare global {
24+
interface ObjectConstructor {
25+
typedKeys<T>(obj: T): Array<keyof T>;
26+
}
27+
}
28+
Object.typedKeys = Object.keys as any;
29+
2330
Notifications.setNotificationHandler({
2431
handleNotification: async () => {
2532
return {
@@ -34,7 +41,8 @@ createTables();
3441
LottieSplashScreen.hide();
3542

3643
const App = () => {
37-
const navigationRef = useRef<NavigationContainerRef<RootStackParamList>>(null);
44+
const navigationRef =
45+
useRef<NavigationContainerRef<RootStackParamList>>(null);
3846

3947
return (
4048
<GestureHandlerRootView style={styles.flex}>

package.json

Lines changed: 31 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"prestart": "node scripts/setEnvFile.cjs Debug",
99
"start": "rock start",
1010
"lint": "eslint ./src --ext .js,.jsx,.ts,.tsx",
11-
"type-check": "tsc --noEmit",
11+
"type-check": "tsc --noEmit --skipLibCheck",
1212
"prettier": "prettier --write \"./src/**/*.{js,jsx,ts,tsx}\" ./scripts",
1313
"buildRelease": "node scripts/setEnvFile.cjs Release && rock build:android --variant release --local",
1414
"open": "open ./android/app/build/outputs/apk/release/",
@@ -47,8 +47,7 @@
4747
"@react-navigation/bottom-tabs": "^7.4.7",
4848
"@react-navigation/native": "^7.1.17",
4949
"@react-navigation/native-stack": "^7.3.26",
50-
"@react-navigation/stack": "^7.4.8",
51-
"@shopify/flash-list": "2.0.2",
50+
"@shopify/flash-list": "^2.0.3",
5251
"cheerio": "1.0.0-rc.12",
5352
"color": "^5.0.0",
5453
"dayjs": "^1.11.18",
@@ -81,6 +80,7 @@
8180
"react-native-file-access": "^3.2.0",
8281
"react-native-gesture-handler": "^2.28.0",
8382
"react-native-lottie-splash-screen": "^1.1.2",
83+
"react-native-mmkv": "^3.3.3",
8484
"react-native-pager-view": "^6.9.1",
8585
"react-native-paper": "^5.14.5",
8686
"react-native-reanimated": "^4.1.0",
@@ -90,38 +90,42 @@
9090
"react-native-shimmer-placeholder": "^2.0.9",
9191
"react-native-tab-view": "^4.1.3",
9292
"react-native-url-polyfill": "^2.0.0",
93-
"react-native-webview": "13.15.0",
93+
"react-native-webview": "^13.16.0",
9494
"react-native-worklets": "^0.5.1",
9595
"react-native-zip-archive": "^7.0.2",
9696
"sanitize-html": "^2.17.0",
9797
"urlencode": "^2.0.0"
9898
},
9999
"devDependencies": {
100-
"@babel/core": "^7.26.0",
101-
"@babel/preset-env": "^7.25.3",
102-
"@babel/runtime": "^7.25.0",
103-
"@react-native-community/cli": "^18.0.0",
104-
"@react-native-community/cli-platform-android": "^18.0.0",
105-
"@react-native-community/cli-platform-ios": "^18.0.0",
106-
"@react-native/babel-preset": "^0.79.2",
107-
"@react-native/eslint-config": "^0.79.2",
108-
"@react-native/metro-config": "^0.79.2",
109-
"@react-native/typescript-config": "^0.79.2",
110-
"@types/color": "^3.0.3",
111-
"@types/i18n-js": "^3.8.2",
112-
"@types/lodash-es": "^4.17.6",
113-
"@types/react": "19.1.3",
114-
"@types/sanitize-html": "^2.11.0",
100+
"@babel/core": "^7.28.4",
101+
"@babel/plugin-transform-export-namespace-from": "^7.27.1",
102+
"@babel/preset-env": "^7.28.3",
103+
"@babel/runtime": "^7.28.4",
104+
"@react-native/babel-preset": "^0.81.1",
105+
"@react-native/eslint-config": "^0.81.1",
106+
"@react-native/metro-config": "^0.81.1",
107+
"@react-native/typescript-config": "^0.81.1",
108+
"@rock-js/platform-android": "^0.11.2",
109+
"@rock-js/platform-ios": "^0.11.2",
110+
"@rock-js/plugin-metro": "^0.11.2",
111+
"@rozenite/metro": "1.0.0-alpha.14",
112+
"@rozenite/mmkv-plugin": "1.0.0-alpha.14",
113+
"@rozenite/network-activity-plugin": "1.0.0-alpha.14",
114+
"@rozenite/performance-monitor-plugin": "1.0.0-alpha.14",
115+
"@rozenite/react-navigation-plugin": "1.0.0-alpha.14",
116+
"@types/color": "^4.2.0",
117+
"@types/lodash-es": "^4.17.12",
118+
"@types/react": "~19.1.12",
119+
"@types/sanitize-html": "^2.16.0",
115120
"babel-plugin-module-resolver": "^5.0.2",
116-
"babel-plugin-react-compiler": "19.1.0-rc.2",
117-
"eslint": "^8.19.0",
121+
"babel-plugin-react-compiler": "19.1.0-rc.3",
122+
"eslint": "^8.57.1",
118123
"husky": "^7.0.4",
119124
"lint-staged": "^12.5.0",
120125
"prettier": "2.8.8",
121126
"react-native-dotenv": "^3.4.11",
122-
"react-native-mmkv": "^3.3.1",
123127
"react-native-performance": "^5.1.4",
124-
"rock": "^0.11.1",
128+
"rock": "^0.11.2",
125129
"typescript": "~5.9.2"
126130
},
127131
"lint-staged": {
@@ -132,5 +136,8 @@
132136
},
133137
"engines": {
134138
"node": ">=20"
135-
}
139+
},
140+
"trustedDependencies": [
141+
"protobufjs"
142+
]
136143
}

pnpm-lock.yaml

Lines changed: 414 additions & 292 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/BottomSheet/BottomSheet.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { useBackHandler } from '@hooks/index';
1010
import { BottomSheetModalMethods } from '@gorhom/bottom-sheet/lib/typescript/types';
1111
import BottomSheetBackdrop from './BottomSheetBackdrop';
1212
import { useWindowDimensions } from 'react-native';
13-
import { useTheme } from '@hooks/persisted';
13+
import { useTheme } from '@providers/Providers';
1414
import { overlay } from 'react-native-paper';
1515

1616
interface BottomSheetProps

src/components/Context/LibraryContext.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@ import React, {
77
} from 'react';
88

99
// Import existing settings hook
10-
import {
11-
useLibrarySettings,
12-
LibrarySettings,
13-
} from '@hooks/persisted/useSettings';
10+
1411
import { DBNovelInfo } from '@database/types';
1512
import {
1613
ExtendedCategory,
@@ -19,12 +16,13 @@ import {
1916
import { useLibraryNovels } from '@hooks/persisted/library/useLibraryNovels';
2017
import { useLibraryActions } from '@hooks/persisted/library/useLibraryActions';
2118
import ServiceManager, { QueuedBackgroundTask } from '@services/ServiceManager';
19+
import { SettingsContextType, useSettingsContext } from './SettingsContext';
2220

2321
type LibraryContextType = {
2422
library: DBNovelInfo[];
2523
categories: ExtendedCategory[];
2624
isLoading: boolean;
27-
settings: LibrarySettings;
25+
settings: SettingsContextType;
2826
searchText: string;
2927
setSearchText: React.Dispatch<React.SetStateAction<string>>;
3028
refetchLibrary: () => void;
@@ -43,7 +41,7 @@ interface LibraryContextProviderProps {
4341
export function LibraryContextProvider({
4442
children,
4543
}: LibraryContextProviderProps) {
46-
const settings = useLibrarySettings();
44+
const settings = useSettingsContext();
4745

4846
const { categories, categoriesLoading, refreshCategories, setCategories } =
4947
useFetchCategories();

src/components/Context/SettingsContext.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import React, { createContext, useContext } from 'react';
33
import { useSettings } from '@hooks/persisted/useSettings';
44
import { defaultSettings } from '@screens/settings/constants/defaultValues';
55

6-
type SettingsContextType = ReturnType<typeof useSettings>;
6+
export type SettingsContextType = ReturnType<typeof useSettings>;
77

88
const defaultValue = defaultSettings as any as SettingsContextType;
99
const SettingsContext = createContext<SettingsContextType>(defaultValue);

src/components/Modal/KeyboardAvoidingModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Modal, ModalProps, overlay, Portal } from 'react-native-paper';
33
import { StyleSheet, Text, View } from 'react-native';
44
import Button from '@components/Button/Button';
55
import { ThemeColors } from '@theme/types';
6-
import { useTheme } from '@hooks/persisted';
6+
import { useTheme } from '@providers/Providers';
77
import { getString } from '@strings/translations';
88
import Animated, {
99
measure,

src/components/NovelCover.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { LinearGradient } from 'expo-linear-gradient';
1212
import ListView from './ListView';
1313

1414
import { useDeviceOrientation } from '@hooks';
15+
import { useSettingsContext } from './Context/SettingsContext';
1516
import { coverPlaceholderColor } from '../theme/colors';
1617
import { DisplayModes } from '@screens/library/constants/constants';
1718
import { DBNovelInfo, NovelInfo } from '@database/types';
@@ -22,7 +23,6 @@ import { getString } from '@strings/translations';
2223
import SourceScreenSkeletonLoading from '@screens/browse/loadingAnimation/SourceScreenSkeletonLoading';
2324
import { defaultCover } from '@plugins/helpers/constants';
2425
import { ActivityIndicator } from 'react-native-paper';
25-
import { useSettingsContext } from './Context/SettingsContext';
2626

2727
interface UnreadBadgeProps {
2828
chaptersDownloaded: number;
@@ -94,7 +94,7 @@ function NovelCover<
9494
const orientation = useDeviceOrientation();
9595

9696
const numColumns = useMemo(
97-
() => (orientation === 'landscape' ? 6 : novelsPerRow),
97+
() => (orientation === 'landscape' ? 6 : novelsPerRow ?? 3),
9898
[orientation, novelsPerRow],
9999
);
100100

@@ -159,15 +159,15 @@ function NovelCover<
159159
{libraryStatus ? <InLibraryBadge theme={theme} /> : null}
160160
{isFromDB(item) ? (
161161
<>
162-
{showDownloadBadges && item.chaptersDownloaded > 0 ? (
162+
{showUnreadBadges && item.chaptersDownloaded > 0 ? (
163163
<DownloadBadge
164164
showUnreadBadges={showUnreadBadges}
165165
chaptersDownloaded={item.chaptersDownloaded}
166166
chaptersUnread={item.chaptersUnread}
167167
theme={theme}
168168
/>
169169
) : null}
170-
{showUnreadBadges && item.chaptersUnread > 0 ? (
170+
{showDownloadBadges && item.chaptersUnread > 0 ? (
171171
<UnreadBadge
172172
theme={theme}
173173
chaptersDownloaded={item.chaptersDownloaded}
@@ -208,7 +208,7 @@ function NovelCover<
208208
<ListView
209209
item={item}
210210
downloadBadge={
211-
showDownloadBadges && isFromDB(item) && item.chaptersDownloaded ? (
211+
showUnreadBadges && isFromDB(item) && item.chaptersDownloaded ? (
212212
<DownloadBadge
213213
theme={theme}
214214
showUnreadBadges={showUnreadBadges}
@@ -218,7 +218,7 @@ function NovelCover<
218218
) : null
219219
}
220220
unreadBadge={
221-
showUnreadBadges && isFromDB(item) && item.chaptersUnread ? (
221+
showDownloadBadges && isFromDB(item) && item.chaptersUnread ? (
222222
<UnreadBadge
223223
theme={theme}
224224
chaptersDownloaded={item.chaptersDownloaded}

src/components/Skeleton/Skeleton.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { useAppSettings } from '@hooks/persisted';
1+
import { useSettingsContext } from '../Context/SettingsContext';
22
import { useTheme } from '@providers/Providers';
33
import * as React from 'react';
44
import { StyleProp, ViewStyle, StyleSheet, View } from 'react-native';
@@ -16,7 +16,7 @@ const duration = 1000;
1616

1717
function useSetupLoadingAnimations() {
1818
const sv = useSharedValue(0);
19-
const { disableLoadingAnimations } = useAppSettings();
19+
const { disableLoadingAnimations } = useSettingsContext();
2020
const theme = useTheme();
2121
const [highlightColor, backgroundColor] = useLoadingColors(theme);
2222

@@ -160,7 +160,7 @@ function NovelMetaSkeleton() {
160160

161161
const ChapterListSkeleton = ({ img }: { img?: boolean }) => {
162162
const sv = useSharedValue(0);
163-
const { disableLoadingAnimations } = useAppSettings();
163+
const { disableLoadingAnimations } = useSettingsContext();
164164

165165
React.useEffect(() => {
166166
if (disableLoadingAnimations) return;

src/components/TextInput/TextInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
TextInputProps as RNTextInputProps,
66
} from 'react-native';
77

8-
import { useTheme } from '@hooks/persisted';
8+
import { useTheme } from '@providers/Providers';
99

1010
interface TextInputProps extends RNTextInputProps {
1111
error?: boolean;

0 commit comments

Comments
 (0)