Skip to content

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

fix build errors

Ammar Ahmed9591451331af
diff --git a/apps/mobile/babel.config.js b/apps/mobile/babel.config.js
index 51103124f..bdb2635e9 100644
--- a/apps/mobile/babel.config.js
+++ b/apps/mobile/babel.config.js
@@ -18,7 +18,7 @@ const configs = {
production: {
presets: ['module:metro-react-native-babel-preset'],
plugins: [
- //'transform-remove-console',
+ 'transform-remove-console',
'@babel/plugin-transform-named-capturing-groups-regex',
'react-native-reanimated/plugin'
]
diff --git a/apps/mobile/globals.js b/apps/mobile/globals.js
index e27c07cd5..160a974f7 100644
--- a/apps/mobile/globals.js
+++ b/apps/mobile/globals.js
@@ -37,27 +37,23 @@ try {
}
});
}
-
-ScriptManager.shared.on('resolving', (...args) => {
- console.log('DEBUG/resolving', ...args);
-});
-
-ScriptManager.shared.on('resolved', (...args) => {
- console.log('DEBUG/resolved', ...args);
-});
-
-ScriptManager.shared.on('prefetching', (...args) => {
- console.log('DEBUG/prefetching', ...args);
-});
-
-ScriptManager.shared.on('loading', (...args) => {
- console.log('DEBUG/loading', ...args);
-});
-
-ScriptManager.shared.on('loaded', (...args) => {
- console.log('DEBUG/loaded', ...args);
-});
-
-ScriptManager.shared.on('error', (...args) => {
- console.log('DEBUG/error', ...args);
-});
+if (__DEV__) {
+ // ScriptManager.shared.on('resolving', (...args) => {
+ // console.log('DEBUG/resolving', ...args);
+ // });
+ // ScriptManager.shared.on('resolved', (...args) => {
+ // console.log('DEBUG/resolved', ...args);
+ // });
+ // ScriptManager.shared.on('prefetching', (...args) => {
+ // console.log('DEBUG/prefetching', ...args);
+ // });
+ // ScriptManager.shared.on('loading', (...args) => {
+ // console.log('DEBUG/loading', ...args);
+ // });
+ // ScriptManager.shared.on('loaded', (...args) => {
+ // console.log('DEBUG/loaded', ...args);
+ // });
+ // ScriptManager.shared.on('error', (...args) => {
+ // console.log('DEBUG/error', ...args);
+ // });
+}
diff --git a/apps/mobile/index.js b/apps/mobile/index.js
index 6c98182fb..a9a6a3042 100644
--- a/apps/mobile/index.js
+++ b/apps/mobile/index.js
@@ -5,32 +5,25 @@ import 'react-native-gesture-handler';
import React from 'react';
import { AppRegistry, LogBox, Platform, UIManager } from 'react-native';
import Config from 'react-native-config';
-import { enableLayoutAnimations } from 'react-native-reanimated/lib/reanimated2/core';
import { SafeAreaProvider } from 'react-native-safe-area-context';
-import { enableScreens } from 'react-native-screens';
import appJson from './app.json';
import Notifications from './src/services/notifications';
-enableLayoutAnimations(true);
+import App from './App';
const appName = appJson.name;
if (Config.isTesting) {
Date.prototype.toLocaleString = () => 'XX-XX-XX';
}
-
-enableScreens(true);
UIManager.setLayoutAnimationEnabledExperimental &&
UIManager.setLayoutAnimationEnabledExperimental(true);
if (__DEV__) {
LogBox.ignoreAllLogs();
}
-
-let App;
let NotesnookShare;
Notifications.init();
let QuickNoteIOS;
const AppProvider = () => {
- App = require('./App').default;
return <App />;
};
diff --git a/apps/mobile/src/components/dialogprovider/index.js b/apps/mobile/src/components/dialogprovider/index.js
index 60fd288f1..2bb645eaf 100644
--- a/apps/mobile/src/components/dialogprovider/index.js
+++ b/apps/mobile/src/components/dialogprovider/index.js
@@ -1,4 +1,5 @@
import React from 'react';
+import { useNoteStore } from '../../stores/use-notes-store';
import { useThemeStore } from '../../stores/use-theme-store';
import { AnnouncementDialog } from '../announcements';
import { AttachmentDialog } from '../attachments';
@@ -26,6 +27,7 @@ import RestoreDataSheet from '../sheets/restore-data';
const DialogProvider = React.memo(
() => {
const colors = useThemeStore(state => state.colors);
+ const loading = useNoteStore(state => state.loading);
return (
<>
@@ -48,7 +50,7 @@ const DialogProvider = React.memo(
<PublishNoteSheet />
<ManageTagsSheet />
<AttachmentDialog />
- <Expiring />
+ {loading ? null : <Expiring />}
<AnnouncementDialog />
<SessionExpired />
</>
diff --git a/apps/mobile/webpack.config.cjs b/apps/mobile/webpack.config.cjs
index 41e13c3ad..5cd4b6dc3 100644
--- a/apps/mobile/webpack.config.cjs
+++ b/apps/mobile/webpack.config.cjs
@@ -191,8 +191,8 @@ module.exports = env => {
? ['module:react-refresh/babel', 'react-native-reanimated/plugin']
: [
'react-native-reanimated/plugin',
- `@babel/plugin-transform-named-capturing-groups-regex`
- //'transform-remove-console'
+ `@babel/plugin-transform-named-capturing-groups-regex`,
+ 'transform-remove-console'
]
}
}