Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
6358fcd
added flake.nix
CD-Z Aug 3, 2025
5f9df0e
started
CD-Z Jun 12, 2024
ae90114
Working Display Mode and Items per row
CD-Z Jun 14, 2024
d57a4b2
finished general setting screen (except show last update)
CD-Z Jun 15, 2024
173b87d
added all desciptions to generalsettigs
CD-Z Jun 15, 2024
c6659f5
added Appearance settings themePicker
CD-Z Jun 15, 2024
c598713
added Pure black dark mode
CD-Z Jun 15, 2024
bff19c6
added useKeyboardHeight hook
CD-Z Jun 15, 2024
ab93f81
Working accentColorModal
CD-Z Jun 15, 2024
bd4d9ab
finished appearance screen
CD-Z Jun 15, 2024
88d474d
removed console.log
CD-Z Jun 15, 2024
5c4fbaa
added dragable readersettings webview
CD-Z Jun 15, 2024
1f6aaae
added dynamic SettingsStack
CD-Z Jun 16, 2024
3a66173
progress on reader settings
CD-Z Jun 23, 2024
682efb7
added TextArea settings
CD-Z Jun 25, 2024
13549d1
added display settings
CD-Z Jun 25, 2024
dd4da64
extracted types from Settings.ts
CD-Z Sep 20, 2024
9726a47
upadted imports
CD-Z Sep 20, 2024
ae7258b
changed folderstructure
CD-Z Sep 20, 2024
4c592f3
added TTS setting
CD-Z Sep 20, 2024
9e98706
added repos
CD-Z Sep 20, 2024
f13a1b0
added Tracking setting
CD-Z Sep 22, 2024
6395a83
added InfoItem
CD-Z Sep 22, 2024
a232f40
renamed DefaultModal to selectionModal
CD-Z Sep 22, 2024
adb221e
reorganization
CD-Z Sep 22, 2024
51f610b
animated modal placement
CD-Z Oct 24, 2024
9ebbffd
added subgroup ids
CD-Z Oct 26, 2024
62da92a
new reader bottomsheet
CD-Z Oct 26, 2024
1522801
fixed dependant issue
CD-Z Oct 26, 2024
6fb3163
added quickSettings compatibility
CD-Z Oct 26, 2024
24a8a4a
deleted unused imports
CD-Z Oct 26, 2024
ef9fa41
prepare for mass deletion
CD-Z Oct 26, 2024
45f7cfd
deleted old settings files
CD-Z Oct 26, 2024
fcbd7e4
removed lint errors
CD-Z Oct 26, 2024
cb297de
deleted comments
CD-Z Oct 26, 2024
618c2cb
Better modal animation
CD-Z Oct 27, 2024
54fc02f
deleted tracker screen
CD-Z Oct 27, 2024
1393b93
fix custom js
CD-Z Oct 27, 2024
613d9ce
minimum height for reader settings
CD-Z Oct 27, 2024
f0787b2
fix lint
CD-Z Oct 27, 2024
ecc5f79
make bigger
CD-Z Oct 27, 2024
be0b5c2
switched to react native reanimated animation
CD-Z Oct 29, 2024
08ce579
fixed dependents not showing
CD-Z Oct 29, 2024
a82d97d
fix dependents issue for real
CD-Z Oct 29, 2024
87e81b6
changed animation
CD-Z Oct 29, 2024
32ceb22
changed bottomsheet style
CD-Z Oct 29, 2024
5f6c36e
changed draggable
CD-Z Oct 29, 2024
0b7bad9
fixed browseTabs redirection
CD-Z Oct 29, 2024
f0efe79
fix BottomSheet
CD-Z May 24, 2025
99e6f6b
extractected webview from readerSettings
CD-Z May 24, 2025
32ac505
complete settings
CD-Z May 24, 2025
4fd5e25
remove @react-navigation/stack
CD-Z May 24, 2025
af5006e
added preload
CD-Z May 24, 2025
4a23d49
move advancedScreen and add scrollview
CD-Z May 24, 2025
0cf1998
update reposettings
CD-Z May 25, 2025
31e4a82
inline function
CD-Z May 25, 2025
c13300c
fix badge setting
CD-Z May 25, 2025
8745802
remove redundant defaultValue
CD-Z May 29, 2025
2b0f880
improve SettingsWebview
CD-Z May 30, 2025
dac0e60
remove gridSize enum
CD-Z May 30, 2025
b42a625
Only use dynamic ColorPickerModal
CD-Z May 30, 2025
cdb67d4
Fixed ColorPicker TextInput
CD-Z May 30, 2025
46d8bd3
Added gap to switch
CD-Z May 30, 2025
ab061fb
fix ReaderThemeSelector
CD-Z May 30, 2025
148fe12
ability to save empty text
CD-Z May 30, 2025
1571e10
fix lint
CD-Z May 30, 2025
2b559e7
fix ReaderTheme
CD-Z May 31, 2025
6e822b0
merge settings categories
CD-Z Jun 1, 2025
08b9b5a
fix ReaderBottomSheet
CD-Z Jun 4, 2025
9f454a0
fix ColorPicker
CD-Z Jun 5, 2025
4420832
Change autoScrollOffset to autoScrollOffsetPercent
CD-Z Jun 5, 2025
6a2886d
fix --readerSettings-theme css variable
CD-Z Jun 6, 2025
7f265bb
fix type issues
Jun 6, 2025
ba377fe
fix backgroundColor select
Jun 6, 2025
14d4087
Settings not crashing
Jun 6, 2025
f34381b
fix modal settings crashing
CD-Z Aug 4, 2025
6eb8148
renaming
CD-Z Aug 4, 2025
16c2642
fix type and lint issues
CD-Z Sep 13, 2025
2ded0c4
update lockfile
CD-Z Sep 13, 2025
4f1cdee
simplified code
CD-Z Sep 13, 2025
139b6dd
performance improvements
CD-Z Sep 14, 2025
a13ceb5
fix lint and type issues
CD-Z Sep 14, 2025
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
9 changes: 8 additions & 1 deletion App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import { GestureHandlerRootView } from 'react-native-gesture-handler';
import LottieSplashScreen from 'react-native-lottie-splash-screen';
import { SafeAreaProvider } from 'react-native-safe-area-context';
import { Provider as PaperProvider } from 'react-native-paper';
import { BottomSheetModalProvider } from '@gorhom/bottom-sheet';
import * as Notifications from 'expo-notifications';

import { createTables } from '@database/db';
import AppErrorBoundary from '@components/AppErrorBoundary/AppErrorBoundary';

import Main from './src/navigators/Main';
import { BottomSheetModalProvider } from '@gorhom/bottom-sheet';

// Rozenite DevTools
import { useReactNavigationDevTools } from '@rozenite/react-navigation-plugin';
Expand All @@ -26,6 +26,13 @@ import { store } from '@plugins/helpers/storage';
import { MMKVStorage } from '@utils/mmkv/mmkv';
import { NavigationContainerRef } from '@react-navigation/native';

declare global {
interface ObjectConstructor {
typedKeys<T>(obj: T): Array<keyof T>;
}
}
Object.typedKeys = Object.keys as any;

Notifications.setNotificationHandler({
handleNotification: async () => {
return {
Expand Down
2 changes: 1 addition & 1 deletion android/app/src/main/assets/js/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ window.reader = new (function () {
const settings = this.readerSettings.val;
document.documentElement.style.setProperty(
'--readerSettings-theme',
settings.theme,
settings.backgroundColor,
);
document.documentElement.style.setProperty(
Comment on lines 59 to 63
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Fallback when backgroundColor is missing; keep compatibility with theme

If settings.backgroundColor is undefined, CSS var becomes empty. Provide safe fallback to prior theme.

-    document.documentElement.style.setProperty(
-      '--readerSettings-theme',
-      settings.backgroundColor,
-    );
+    document.documentElement.style.setProperty(
+      '--readerSettings-theme',
+      settings.backgroundColor ?? settings.theme ?? '#000000'
+    );
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
document.documentElement.style.setProperty(
'--readerSettings-theme',
settings.theme,
settings.backgroundColor,
);
document.documentElement.style.setProperty(
document.documentElement.style.setProperty(
'--readerSettings-theme',
settings.backgroundColor ?? settings.theme ?? '#000000'
);
document.documentElement.style.setProperty(
🤖 Prompt for AI Agents
In android/app/src/main/assets/js/core.js around lines 59-63, the code sets
--readerSettings-theme directly from settings.backgroundColor which can be
undefined; change it to detect if settings.backgroundColor is present and, if
not, use the previous theme value as a fallback (read the existing CSS var or
the prior theme variable) before calling
document.documentElement.style.setProperty so the CSS var never becomes empty
and compatibility with the prior theme is preserved.

'--readerSettings-padding',
Expand Down
3 changes: 1 addition & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@
which
rsync
scrcpy

]
++ pkgs.lib.optionals enableEmulator [
libglvnd
Expand Down Expand Up @@ -175,7 +174,7 @@
echo " scrcpy"
echo "--------------------------"
'';
};
};
};
});
}
1 change: 0 additions & 1 deletion ln
Submodule ln deleted from 752299
10 changes: 9 additions & 1 deletion metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ const customConfig = {
resolver: {
unstable_enableSymlinks: true, // For pnpm symlinks
},
transformer: {
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: false, // temporarily disable to rule out bundle fetch issue
},
}),
},
server: {
port: 8081,
enhanceMiddleware: (metroMiddleware, metroServer) => {
Expand All @@ -52,4 +60,4 @@ const customConfig = {
},
},
};
module.exports = withRozenite(mergeConfig(defaultConfig, customConfig));
module.exports = withRozenite(mergeConfig(defaultConfig, customConfig));
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
"@react-navigation/bottom-tabs": "^7.4.7",
"@react-navigation/native": "^7.1.17",
"@react-navigation/native-stack": "^7.3.26",
"@react-navigation/stack": "^7.4.8",
"@shopify/flash-list": "2.0.2",
"cheerio": "1.0.0-rc.12",
"color": "^5.0.0",
Expand Down Expand Up @@ -137,5 +136,8 @@
},
"engines": {
"node": ">=20"
}
},
"trustedDependencies": [
"protobufjs"
]
}
26 changes: 0 additions & 26 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

142 changes: 0 additions & 142 deletions src/components/ColorPickerModal/ColorPickerModal.tsx

This file was deleted.

52 changes: 0 additions & 52 deletions src/components/ColorPreferenceItem/ColorPreferenceItem.tsx

This file was deleted.

9 changes: 2 additions & 7 deletions src/components/Context/LibraryContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,10 @@ import {
useLibrary,
UseLibraryReturnType,
} from '@screens/library/hooks/useLibrary';
import { useLibrarySettings } from '@hooks/persisted';
import { LibrarySettings } from '@hooks/persisted/useSettings';

// type Library = Category & { novels: LibraryNovelInfo[] };

type LibraryContextType = UseLibraryReturnType & {
settings: LibrarySettings;
};
type LibraryContextType = UseLibraryReturnType;

const defaultValue = {} as LibraryContextType;
const LibraryContext = createContext<LibraryContextType>(defaultValue);
Expand All @@ -21,10 +17,9 @@ export function LibraryContextProvider({
children: React.ReactNode;
}) {
const useLibraryParams = useLibrary();
const settings = useLibrarySettings();

return (
<LibraryContext.Provider value={{ ...useLibraryParams, settings }}>
<LibraryContext.Provider value={useLibraryParams}>
{children}
</LibraryContext.Provider>
);
Expand Down
27 changes: 27 additions & 0 deletions src/components/Context/SettingsContext.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import React, { createContext, useContext } from 'react';

import { useSettings } from '@hooks/persisted/useSettings';
import { defaultSettings } from '@screens/settings/constants/defaultValues';

type SettingsContextType = ReturnType<typeof useSettings>;

const defaultValue = defaultSettings as any as SettingsContextType;
const SettingsContext = createContext<SettingsContextType>(defaultValue);
Comment on lines +8 to +9
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Provide a safe default context value (remove any cast).

Current default casts defaultSettings to the full context type; missing functions will be undefined if used outside a provider, causing crashes. Provide no-op functions in the default.

-const defaultValue = defaultSettings as any as SettingsContextType;
+const defaultValue: SettingsContextType = {
+  ...defaultSettings,
+  setSettings: () => {},
+  saveCustomReaderTheme: () => {},
+  deleteCustomReaderTheme: () => {},
+};
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const defaultValue = defaultSettings as any as SettingsContextType;
const SettingsContext = createContext<SettingsContextType>(defaultValue);
const defaultValue: SettingsContextType = {
...defaultSettings,
setSettings: () => {},
saveCustomReaderTheme: () => {},
deleteCustomReaderTheme: () => {},
};
const SettingsContext = createContext<SettingsContextType>(defaultValue);
🤖 Prompt for AI Agents
In src/components/Context/SettingsContext.tsx around lines 8-9, remove the
unsafe "as any as SettingsContextType" cast and replace the default context
value with an object that implements SettingsContextType using safe defaults and
no-op functions for any callback/updater properties (e.g., empty functions or
no-op setters) so consumers can call methods outside a provider without
crashing; ensure all required fields from SettingsContextType are present (use
existing defaultSettings values for data fields and provide explicit no-op
implementations for functions) and pass that object into createContext.


export function SettingsContextProvider({
children,
}: {
children: React.ReactNode;
}) {
const settings = useSettings();

return (
<SettingsContext.Provider value={settings}>
{children}
</SettingsContext.Provider>
);
}

export const useSettingsContext = (): SettingsContextType => {
return useContext(SettingsContext);
};
Loading