Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
c1de7b1
enable predictive back gesture
CD-Z Jun 5, 2026
b98adc7
upgrade to rn 85
CD-Z Jun 6, 2026
026b8fd
remove deprecated
CD-Z Jun 6, 2026
67ef25f
added timeout to theme switch
CD-Z Jun 6, 2026
a7380ec
fix plugin items hit registration
CD-Z Jun 6, 2026
f1a06ff
fix SearchbarV2 hit registration
CD-Z Jun 6, 2026
727109b
fix loading spinner
CD-Z Jun 6, 2026
09a9bd0
migrated to expo
CD-Z Jul 19, 2026
8481b41
migrated to expo
CD-Z Jul 5, 2026
e690886
Fix reader footer animation
CD-Z Jul 5, 2026
ab41004
working again
CD-Z Jul 19, 2026
f626487
added icons back
CD-Z Jul 6, 2026
41845c8
added splashscreen
CD-Z Jul 6, 2026
956f5d2
clean up
CD-Z Jul 6, 2026
15156e8
nitro epub
CD-Z Jul 6, 2026
dcaed6c
fix
CD-Z Jul 6, 2026
718b9ff
remove .env.local from git tracking
CD-Z Jul 18, 2026
4175d66
fix rn background actions not working
CD-Z Jul 18, 2026
5d8e0b9
moving custom permissions to app.json
CD-Z Jul 18, 2026
f39127d
more cleanup
CD-Z Jul 18, 2026
1e96107
fix epub import
CD-Z Jul 18, 2026
db559f6
remove unused deps
CD-Z Jul 18, 2026
ec82e40
Further cleanup for gradle build types
CD-Z Jul 19, 2026
d5440f5
Update build.yml
CD-Z Jul 19, 2026
2ed48fc
ignore android/ and ios/ as they are generated by CNG
CD-Z Jul 19, 2026
d3bce5a
fix lint
CD-Z Jul 19, 2026
f7b6dde
Delete ios directory
CD-Z Jul 19, 2026
bb30225
Delete android directory
CD-Z Jul 19, 2026
495efd8
fix lint
CD-Z Jul 19, 2026
2246a80
fix test mocks
CD-Z Jul 19, 2026
25f0ecc
update packages
CD-Z Jul 19, 2026
c76c63e
update eslint
CD-Z Jul 19, 2026
cb39b8a
fix ThemeProvider placement
CD-Z Jul 19, 2026
59c6855
Merge branch 'master' into fixes
CD-Z Jul 19, 2026
e09c6b5
fix test and lint
CD-Z Jul 19, 2026
b755ee5
Add BackgroundTask native module
CD-Z Jul 22, 2026
40afc34
Merge branch 'master' into fixes
CD-Z Jul 22, 2026
9f96bcb
Add NativeFile changes
CD-Z Jul 22, 2026
21cb251
first round of fixing compatibility issues
CD-Z Jul 22, 2026
4ffd203
added types for native modules
CD-Z Jul 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

30 changes: 0 additions & 30 deletions .eslintrc.js

This file was deleted.

74 changes: 44 additions & 30 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,57 +10,71 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
build-android:
name: Build App
name: Build Android pre-release APK
runs-on: ubuntu-latest
timeout-minutes: 60

steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v5
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v4
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
node-version: '24'
version: "10"

- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: "24"
cache: pnpm
cache-dependency-path: pnpm-lock.yaml

- name: Get pnpm Store Directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Set up Java
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: "17"

- name: Setup pnpm Cache
uses: actions/cache@v4
- name: Set up Gradle cache
uses: gradle/actions/setup-gradle@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
cache-read-only: ${{ github.ref != 'refs/heads/master' }}
gradle-home-cache-cleanup: true

- name: Install Dependencies
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Generate Environment Variables
- name: Generate release environment
run: |
pnpm generate:env:release \
--build-type "Github Action" \
--build-type "GitHub Action" \
--node-env "production" \
--myanimelist-client-id "${{ vars.MYANIMELIST_CLIENT_ID }}" \
--anilist-client-id "${{ vars.ANILIST_CLIENT_ID }}"

- name: Build Android Release with Rock
uses: callstackincubator/android@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO_OWNER: ${{ github.repository_owner }}
REPO_NAME: ${{ github.event.repository.name }}
- name: Generate Android project
run: |
pnpm expo prebuild \
--platform android \
--clean \
--non-interactive

- name: Build pre-release APK
working-directory: android
run: ./gradlew :app:assemblePreRelease --build-cache

- name: Upload APK artifact
uses: actions/upload-artifact@v4
with:
re-sign: true
github-token: ${{ secrets.GITHUB_TOKEN }}
variant: preRelease
name: LNReader-preRelease-${{ github.sha }}
path: android/app/build/outputs/apk/preRelease/app-preRelease.apk
if-no-files-found: error
retention-days: 14
3 changes: 3 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,8 @@ jobs:
- name: Install Dependencies
run: pnpm install --frozen-lockfile

- name: Generate Environment Variables
run: pnpm generate:env:debug

- name: Run ESLint
run: pnpm run lint
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ npm-debug.*
*.orig.*
web-build/
.*env
.env.local
reader_playground/index.html
# macOS
.DS_Store
Expand Down Expand Up @@ -102,3 +103,11 @@ src/generated/**/*

# TypeScript
*.tsbuildinfo

*/**/org.eclipse.buildship.core.prefs
*/**/org.eclipse.jdt.core.prefs
*/**/.classpath
*/**/.project
android/
!modules/**/android/
ios/
27 changes: 14 additions & 13 deletions App.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import 'react-native-url-polyfill/auto';
import { enableFreeze } from 'react-native-screens';

enableFreeze(true);

import React, { Suspense, useEffect } from 'react';
import { Suspense, useEffect } from 'react';
import { StatusBar, StyleSheet } from 'react-native';
import { GestureHandlerRootView } from 'react-native-gesture-handler';
import LottieSplashScreen from 'react-native-lottie-splash-screen';
import * as SplashScreen from 'expo-splash-screen';
import { SafeAreaProvider } from 'react-native-safe-area-context';
import { Provider as PaperProvider } from 'react-native-paper';

Expand All @@ -20,22 +17,26 @@ import { useInitDatabase } from '@database/db';
import { useInitializeAppServices } from '@hooks/common/useInitializeAppServices';
import { ThemeProvider } from '@hooks/persisted/useTheme';

enableFreeze(true);

const App = () => {
const { success: databaseReady, error: databaseError } = useInitDatabase();
const { ready: servicesReady, error: servicesError } =
useInitializeAppServices(Boolean(databaseReady));

useEffect(() => {
if ((databaseReady && servicesReady) || databaseError || servicesError) {
LottieSplashScreen.hide();
SplashScreen.hideAsync();
}
}, [databaseReady, databaseError, servicesReady, servicesError]);

const initializationError = databaseError || servicesError;

if (initializationError) {
return (
<ErrorFallback error={initializationError} resetError={() => null} />
<ThemeProvider>
<ErrorFallback error={initializationError} resetError={() => null} />
</ThemeProvider>
);
}

Expand All @@ -46,18 +47,18 @@ const App = () => {
return (
<Suspense fallback={null}>
<GestureHandlerRootView style={styles.flex}>
<AppErrorBoundary>
<SafeAreaProvider>
<ThemeProvider>
<ThemeProvider>
<AppErrorBoundary>
<SafeAreaProvider>
<PaperProvider>
<BottomSheetModalProvider>
<StatusBar translucent={true} backgroundColor="transparent" />
<Main />
</BottomSheetModalProvider>
</PaperProvider>
</ThemeProvider>
</SafeAreaProvider>
</AppErrorBoundary>
</SafeAreaProvider>
</AppErrorBoundary>
</ThemeProvider>
</GestureHandlerRootView>
</Suspense>
);
Expand Down
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ gem 'concurrent-ruby', '< 1.3.4'
gem 'bigdecimal'
gem 'logger'
gem 'benchmark'
gem 'mutex_m'
gem 'mutex_m'
gem 'nkf'
38 changes: 21 additions & 17 deletions __mocks__/nativeModules.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// require('react-native-gesture-handler/jestSetup');
// require('react-native-reanimated').setUpTests();

jest.mock('@specs/NativeFile', () => ({
jest.mock('@modules/native-file', () => ({
__esModule: true,
default: {
writeFile: jest.fn(),
Expand All @@ -20,23 +20,26 @@ jest.mock('@specs/NativeFile', () => ({
},
}));

jest.mock('@specs/NativeEpub', () => ({
__esModule: true,
default: {
parseNovelAndChapters: jest.fn(() => ({
name: 'Mock Novel',
cover: null,
summary: null,
author: null,
artist: null,
chapters: [],
cssPaths: [],
imagePaths: [],
const mockEpubNovel = {
name: 'Mock Novel',
cover: null,
summary: null,
author: null,
artist: null,
chapters: [],
cssPaths: [],
imagePaths: [],
};

jest.mock('react-native-nitro-modules', () => ({
NitroModules: {
createHybridObject: jest.fn(() => ({
parseNovelAndChapters: jest.fn(() => mockEpubNovel),
})),
},
}));

jest.mock('@specs/NativeTTSMediaControl', () => ({
jest.mock('@modules/native-tts-media-control', () => ({
__esModule: true,
default: {
showMediaNotification: jest.fn(),
Expand All @@ -48,15 +51,16 @@ jest.mock('@specs/NativeTTSMediaControl', () => ({
},
}));

jest.mock('@specs/NativeVolumeButtonListener', () => ({
jest.mock('@modules/native-volume-button-listener', () => ({
__esModule: true,
default: {
addListener: jest.fn(),
addListener: jest.fn(() => ({ remove: jest.fn() })),
removeListeners: jest.fn(),
setActive: jest.fn(),
},
}));

jest.mock('@specs/NativeZipArchive', () => ({
jest.mock('@modules/native-zip-archive', () => ({
__esModule: true,
default: {
zip: jest.fn().mockResolvedValue(),
Expand Down
Loading
Loading