Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

mobile: fix slow launch

Ammar Ahmed88858308fb67
diff --git a/apps/mobile/app/app.tsx b/apps/mobile/app/app.tsx
index daad96cf9..afd96d301 100644
--- a/apps/mobile/app/app.tsx
+++ b/apps/mobile/app/app.tsx
@@ -52,14 +52,13 @@ if (appLockEnabled || appLockMode !== "none") {
useUserStore.getState().lockApp(true);
}
-RNBootSplash.hide({ fade: true });
-changeSystemBarColors();
-
+RNBootSplash.hide();
const App = (props: { configureMode: "note-preview" }) => {
useAppEvents();
//@ts-ignore
globalThis["IS_MAIN_APP_RUNNING"] = true;
useEffect(() => {
+ changeSystemBarColors();
SettingsService.onFirstLaunch();
setTimeout(async () => {
await Notifications.get();
diff --git a/apps/mobile/native/index.js b/apps/mobile/native/index.js
index cf592bf2e..4a842065c 100644
--- a/apps/mobile/native/index.js
+++ b/apps/mobile/native/index.js
@@ -29,8 +29,6 @@ const appName = appJson.name;
if (Config.isTesting) {
Date.prototype.toLocaleString = () => 'XX-XX-XX';
}
-UIManager.setLayoutAnimationEnabledExperimental &&
- UIManager.setLayoutAnimationEnabledExperimental(true);
if (__DEV__) {
console.warn = () => null;
diff --git a/apps/mobile/native/rspack.config.js b/apps/mobile/native/rspack.config.js
index 735ede8b2..f6e74f4f9 100644
--- a/apps/mobile/native/rspack.config.js
+++ b/apps/mobile/native/rspack.config.js
@@ -47,7 +47,7 @@ module.exports = (env) => {
return {
mode,
- cache: true,
+ cache: mode === "production" ? false : true,
experiments: {
parallelCodeSplitting: true,
cache: {
@@ -138,7 +138,9 @@ module.exports = (env) => {
*/
rules: [
...Repack.getJsTransformRules(),
- ...Repack.getAssetTransformRules(),
+ ...Repack.getAssetTransformRules({
+ inline: true
+ }),
{
test: /\.jsx?$/,
type: 'javascript/auto',