Skip to content
Closed
Show file tree
Hide file tree
Changes from 4 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,4 @@ flake.lock
.agents/
.claude/
.jj/
.sisyphus/
76 changes: 23 additions & 53 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<!-- Internet -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
Expand All @@ -15,56 +14,27 @@


<uses-permission android:name="android.permission.VIBRATE" />
<queries>
<intent>
<action android:name="android.intent.action.TTS_SERVICE" />
</intent>
</queries>

<application
android:name=".MainApplication"
android:largeHeap="true"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher"
android:allowBackup="true"
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true"
android:supportsRtl="true">

<meta-data
android:name="expo.modules.notifications.default_notification_icon"
android:resource="@drawable/notification_icon" />

<meta-data
android:name="expo.modules.notifications.default_notification_color"
android:resource="@color/notification_icon_color" />

<activity
android:name=".MainActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize"
android:exported="true"
android:theme="@style/Theme.App.SplashScreen"
android:screenOrientation="unspecified">

<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="lnreader" />
</intent-filter>
</activity>

<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />

<service android:name="com.asterinet.react.bgactions.RNBackgroundActionsTask" android:foregroundServiceType="shortService" />

</application>
<queries>
<intent>
<action android:name="android.intent.action.TTS_SERVICE"/>
</intent>
</queries>
<application android:name=".MainApplication" android:largeHeap="true" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher" android:allowBackup="true" android:theme="@style/AppTheme" android:usesCleartextTraffic="true" android:supportsRtl="true">
<meta-data android:name="expo.modules.notifications.default_notification_color" android:resource="@color/notification_icon_color"/>
<meta-data android:name="expo.modules.notifications.default_notification_icon" android:resource="@drawable/notification_icon"/>
<service android:name="com.asterinet.react.bgactions.RNBackgroundActionsTask" android:foregroundServiceType="shortService"/>
<activity android:name=".MainActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|locale|layoutDirection" android:launchMode="singleTask" android:windowSoftInputMode="adjustResize" android:exported="true" android:theme="@style/Theme.App.SplashScreen" android:screenOrientation="unspecified">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="lnreader"/>
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity"/>
</application>
</manifest>
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
package com.rajarsheechatterjee.LNReader
import expo.modules.ExpoReactHostFactory

import android.app.Application
import android.content.res.Configuration
import com.facebook.react.PackageList
import com.facebook.react.ReactApplication
import com.facebook.react.ReactHost
import com.facebook.react.ReactNativeApplicationEntryPoint.loadReactNative
import com.facebook.react.ReactNativeHost
import com.facebook.react.ReactPackage
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
import com.facebook.react.defaults.DefaultReactNativeHost
import com.facebook.react.soloader.OpenSourceMergedSoMapping
import com.facebook.soloader.SoLoader
import com.rajarsheechatterjee.NativeFile.NativePackage
Expand All @@ -20,27 +18,19 @@ import com.rajarsheechatterjee.NativeZipArchive.NativeZipArchivePackage
import expo.modules.ApplicationLifecycleDispatcher

class MainApplication : Application(), ReactApplication {
override val reactNativeHost: ReactNativeHost =
object : DefaultReactNativeHost(this) {
override fun getPackages(): List<ReactPackage> =
override val reactHost: ReactHost by lazy {
ExpoReactHostFactory.getDefaultReactHost(
context = applicationContext,
packageList =
PackageList(this).packages.apply {
add(NativePackage())
add(NativeTTSMediaControlPackage())
add(NativeVolumeButtonListenerPackage())
add(NativeZipArchivePackage())
}

override fun getJSMainModuleName(): String = "index"

override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG

override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
}
},
)
}

override val reactHost: ReactHost
get() = getDefaultReactHost(applicationContext, reactNativeHost)

override fun onCreate() {
super.onCreate()
loadReactNative(this)
Expand Down
3 changes: 1 addition & 2 deletions android/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<resources>
<string name="app_name">LNReader</string>
</resources>
</resources>
23 changes: 5 additions & 18 deletions android/app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -1,41 +1,28 @@
<?xml
version="1.0"
encoding="UTF-8"
standalone="yes"
?>
<resources xmlns:tools="http://schemas.android.com/tools">
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<style name="AppTheme" parent="Theme.EdgeToEdge">
<item name="android:editTextBackground">@drawable/rn_edit_text_material</item>
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="android:navigationBarColor">@color/colorPrimaryDark</item>
<item name="android:statusBarColor">@color/colorPrimaryDark</item>
<item name="colorControlActivated">#2596be</item>
<item name="android:windowLightStatusBar">true</item>
</style>

<style name="SplashScreen_SplashAnimation">
<item name="android:windowExitAnimation">@android:anim/fade_out</item>
</style>

<style name="SplashScreen_SplashTheme" parent="Theme.AppCompat.NoActionBar">
<item name="android:windowAnimationStyle">@style/SplashScreen_SplashAnimation</item>
</style>

<style name="SplashScreenTheme" parent="SplashScreen_SplashTheme">
<item name="android:statusBarColor">@color/colorPrimaryDark</item>
<item name="android:windowActionBar">false</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowFullscreen">true</item>
<item name="android:navigationBarColor">@color/colorPrimaryDark</item>
</style>
</style>
<style name="Theme.App.SplashScreen" parent="AppTheme">
<!-- Below line is handled by '@expo/configure-splash-screen' command and it's discouraged to modify it manually -->
<!-- Customize your splash screen theme here -->
<item name="android:windowSplashScreenBackground" tools:targetApi="s">@color/colorPrimaryDark</item>
<item name="android:windowSplashScreenAnimatedIcon" tools:targetApi="s" >@drawable/invisible</item>
<item name="android:windowSplashScreenAnimatedIcon" tools:targetApi="s">@drawable/invisible</item>
<item name="android:windowSplashScreenAnimationDuration" tools:targetApi="s">1000</item>
<!-- <item name="icon">@drawable/no_icon</item> -->
<item name="android:windowBackground">@drawable/splashscreen</item>
</style>
</resources>
</resources>
3 changes: 2 additions & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ buildscript {
}
}

apply plugin: "com.facebook.react.rootproject"
apply plugin: "com.facebook.react.rootproject"
apply plugin: "expo-root-project"
Binary file modified android/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
4 changes: 2 additions & 2 deletions android/gradlew

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

40 changes: 32 additions & 8 deletions android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,35 @@
pluginManagement { includeBuild("../node_modules/@react-native/gradle-plugin") }
plugins { id("com.facebook.react.settings") }
pluginManagement {
def reactNativeGradlePlugin = new File(
providers.exec {
workingDir(rootDir)
commandLine("node", "--print", "require.resolve('@react-native/gradle-plugin/package.json', { paths: [require.resolve('react-native/package.json')] })")
}.standardOutput.asText.get().trim()
).getParentFile().absolutePath
includeBuild(reactNativeGradlePlugin)

extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() }
rootProject.name = 'LNReader'
def expoPluginsPath = new File(
providers.exec {
workingDir(rootDir)
commandLine("node", "--print", "require.resolve('expo-modules-autolinking/package.json', { paths: [require.resolve('expo/package.json')] })")
}.standardOutput.asText.get().trim(),
"../android/expo-gradle-plugin"
).absolutePath
includeBuild(expoPluginsPath)
}

include ':app'
includeBuild('../node_modules/@react-native/gradle-plugin')
plugins {
id("com.facebook.react.settings")
id("expo-autolinking-settings")
}

apply from: new File(["node", "--print", "require.resolve('expo/package.json')"].execute(null, rootDir).text.trim(), "../scripts/autolinking.gradle")
useExpoModules()
extensions.configure(com.facebook.react.ReactSettingsExtension) { ex ->
ex.autolinkLibrariesFromCommand(expoAutolinking.rnConfigCommand)
}

rootProject.name = "LNReader"

expoAutolinking.useExpoModules()
expoAutolinking.useExpoVersionCatalog()

include(":app")
includeBuild(expoAutolinking.reactNativeGradlePlugin)
10 changes: 1 addition & 9 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const ReactCompilerConfig = {
module.exports = function (api) {
api.cache(true);
return {
presets: ['module:@react-native/babel-preset'],
presets: ['babel-preset-expo'],
plugins: [
'module:@babel/plugin-transform-export-namespace-from',
['babel-plugin-react-compiler', ReactCompilerConfig],
Expand Down Expand Up @@ -33,14 +33,6 @@ module.exports = function (api) {
},
],
'react-native-worklets/plugin',
[
'module:react-native-dotenv',
{
envName: 'APP_ENV',
moduleName: '@env',
path: '.env',
},
],
[
'inline-import',
{
Expand Down
3 changes: 3 additions & 0 deletions drizzle/20251222152612_past_mandrill/migration.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
ALTER TABLE IF EXITS '__drizzle_migrations' ADD COLUMN 'applied_at' text;
ALTER TABLE IF EXITS '__drizzle_migrations' ADD COLUMN 'name' text;

CREATE TABLE IF NOT EXISTS `Category` (
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
`name` text NOT NULL,
Expand Down
14 changes: 6 additions & 8 deletions drizzle/migrations.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
// This file is required for Expo/React Native SQLite migrations - https://orm.drizzle.team/quick-sqlite/expo

import m0000 from './20251222152612_past_mandrill/migration.sql';

export default {
journal: { entries: [] },
migrations: {
'20251222152612_past_mandrill': m0000,
},
};
export default {
migrations: {
"20251222152612_past_mandrill": m0000
}
}
17 changes: 11 additions & 6 deletions env.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
declare module '@env' {
export const MYANIMELIST_CLIENT_ID: string;
export const ANILIST_CLIENT_ID: string;
export const GIT_HASH: string;
export const RELEASE_DATE: string;
export const BUILD_TYPE: 'Debug' | 'Release' | 'Beta' | 'Github Action';
declare module 'react-native-config' {
export interface NativeConfig {
MYANIMELIST_CLIENT_ID: string;
ANILIST_CLIENT_ID: string;
GIT_HASH: string;
RELEASE_DATE: string;
BUILD_TYPE: 'Debug' | 'Release' | 'Beta' | 'Github Action';
}

export const Config: NativeConfig;
export default Config;
}
10 changes: 6 additions & 4 deletions ios/LNReader.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
name = Libraries;
sourceTree = "<group>";
};
83CBB9F61A601CBA00E9B192 = {
83CBB9F61A601CBA00E9B192 /* PBXGroup */ = {
isa = PBXGroup;
children = (
147488C52DD9A66F00C6D0A2 /* NativeZipArchive */,
Expand Down Expand Up @@ -208,7 +208,7 @@
/* End PBXNativeTarget section */

/* Begin PBXProject section */
83CBB9F71A601CBA00E9B192 /* Project object */ = {
83CBB9F71A601CBA00E9B192 = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1210;
Expand All @@ -226,7 +226,7 @@
en,
Base,
);
mainGroup = 83CBB9F61A601CBA00E9B192;
mainGroup = 83CBB9F61A601CBA00E9B192 /* PBXGroup */;
productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;
projectDirPath = "";
projectRoot = "";
Expand Down Expand Up @@ -497,6 +497,7 @@
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG";
USE_HERMES = true;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand Down Expand Up @@ -566,6 +567,7 @@
SDKROOT = iphoneos;
USE_HERMES = true;
VALIDATE_PRODUCT = YES;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand All @@ -592,5 +594,5 @@
};
/* End XCConfigurationList section */
};
rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */;
rootObject = 83CBB9F71A601CBA00E9B192;
}
Loading
Loading