mobile: fix bootsplash logo in dark mode
@@ -594,9 +594,12 @@ export const useAppEvents = () => {
|
||||
|
||||
useEffect(() => {
|
||||
if (!loading) {
|
||||
doAppLoadActions();
|
||||
(async () => {
|
||||
onUserUpdated();
|
||||
doAppLoadActions();
|
||||
})();
|
||||
}
|
||||
}, [loading]);
|
||||
}, [loading, onUserUpdated]);
|
||||
|
||||
const initializeDatabase = useCallback(async () => {
|
||||
if (!db.isInitialized) {
|
||||
@@ -604,10 +607,9 @@ export const useAppEvents = () => {
|
||||
DatabaseLogger.info("Initializing database");
|
||||
await db.init();
|
||||
}
|
||||
await onUserUpdated();
|
||||
if (IsDatabaseMigrationRequired()) return;
|
||||
loadNotes();
|
||||
}, [IsDatabaseMigrationRequired, loadNotes, onUserUpdated]);
|
||||
}, [IsDatabaseMigrationRequired, loadNotes]);
|
||||
|
||||
useEffect(() => {
|
||||
let sub;
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
"@flyerhq/react-native-link-preview": "^1.6.0",
|
||||
"@mdi/js": "^6.7.96",
|
||||
"absolutify": "^0.1.0",
|
||||
"buffer": "^6.0.3",
|
||||
"dayjs": "^1.10.4",
|
||||
"entities": "^3.0.1",
|
||||
"html-to-text": "9.0.5",
|
||||
@@ -30,7 +29,9 @@
|
||||
"react-native-blob-util": "0.17.3",
|
||||
"react-native-swiper-flatlist": "3.2.2",
|
||||
"@streetwriters/showdown": "^3.0.1-alpha.2",
|
||||
"react-native-keyboard-aware-scroll-view": "^0.9.5"
|
||||
"react-native-keyboard-aware-scroll-view": "^0.9.5",
|
||||
"buffer": "^6.0.3",
|
||||
"deprecated-react-native-prop-types": "^4.1.0"
|
||||
},
|
||||
"sideEffects": false
|
||||
}
|
||||
|
||||
@@ -192,12 +192,13 @@ dependencies {
|
||||
// The version of react-native is set by the React Native Gradle Plugin
|
||||
implementation("com.facebook.react:react-android")
|
||||
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.0.0")
|
||||
|
||||
implementation("androidx.core:core-splashscreen:1.0.0")
|
||||
|
||||
implementation 'androidx.multidex:multidex:2.0.1'
|
||||
implementation 'com.squareup.okhttp3:okhttp:4.9.2'
|
||||
implementation 'com.squareup.okhttp3:logging-interceptor:4.9.2'
|
||||
implementation 'com.squareup.okhttp3:okhttp-urlconnection:4.9.2'
|
||||
implementation "androidx.core:core-splashscreen:1.0.0-rc01"
|
||||
|
||||
androidTestImplementation('com.wix:detox:+')
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||
|
||||
|
||||
@@ -75,7 +75,6 @@
|
||||
android:launchMode="singleTask"
|
||||
android:resizeableActivity="true"
|
||||
android:exported="true"
|
||||
android:theme="@style/AppTheme"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
@@ -16,8 +16,8 @@ public class MainActivity extends ReactActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(null);
|
||||
RNBootSplash.init(this);
|
||||
super.onCreate(null);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT && BuildConfig.DEBUG) {
|
||||
WebView.setWebContentsDebuggingEnabled(true);
|
||||
}
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/logo_dark_background"/>
|
||||
<foreground android:drawable="@mipmap/logo_dark_foreground"/>
|
||||
</adaptive-icon>
|
||||
|
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 9.6 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 797 B |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 3.4 KiB |
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="light_blue_50">#FFE1F5FE</color>
|
||||
<color name="light_blue_200">#FF81D4FA</color>
|
||||
<color name="light_blue_600">#FF039BE5</color>
|
||||
<color name="light_blue_900">#FF01579B</color>
|
||||
<color name="bootsplash_background">#1f1f1f</color>
|
||||
</resources>
|
||||
@@ -1,8 +1,39 @@
|
||||
<resources>
|
||||
<!-- BootTheme should inherit from Theme.SplashScreen -->
|
||||
<style name="BootTheme" parent="Theme.SplashScreen">
|
||||
<item name="windowSplashScreenBackground">@color/bootsplash_background_dark</item>
|
||||
<item name="windowSplashScreenAnimatedIcon">@mipmap/logo_dark</item>
|
||||
<item name="postSplashScreenTheme">@style/AppTheme</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
||||
<!-- Base application theme. -->
|
||||
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
|
||||
<!-- Customize your theme here. -->
|
||||
<item name="android:windowDisablePreview">true</item>
|
||||
<item name="android:editTextBackground">@drawable/edit_text</item>
|
||||
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
<item name="android:datePickerDialogTheme">@style/DialogDatePicker.Theme</item>
|
||||
</style>
|
||||
|
||||
<style name="Share.Window" parent="Theme.AppCompat">
|
||||
<item name="android:windowEnterAnimation">@null</item>
|
||||
<item name="android:windowExitAnimation">@null</item>
|
||||
<item name="android:editTextBackground">@drawable/edit_text</item>
|
||||
</style>
|
||||
|
||||
<!-- BootTheme should inherit from Theme.SplashScreen -->
|
||||
<style name="BootTheme" parent="Theme.SplashScreen">
|
||||
<item name="windowSplashScreenBackground">@color/bootsplash_background</item>
|
||||
<item name="windowSplashScreenAnimatedIcon">@mipmap/bootsplash_logo_dark</item>
|
||||
<item name="postSplashScreenTheme">@style/AppTheme</item>
|
||||
</style>
|
||||
|
||||
<!-- Base application theme. -->
|
||||
|
||||
<style name="AppThemeB" parent="Theme.AppCompat.DayNight.NoActionBar">
|
||||
<item name="android:windowIsTranslucent">true</item>
|
||||
<item name="android:windowBackground">@android:color/transparent</item>
|
||||
<item name="android:windowIsFloating">true</item>
|
||||
<item name="android:backgroundDimEnabled">true</item>
|
||||
<item name="android:editTextBackground">@drawable/edit_text</item>
|
||||
</style>
|
||||
|
||||
<style name="DialogDatePicker.Theme" parent="Theme.AppCompat.Light.Dialog">
|
||||
<item name="colorAccent">#2b2b2b</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
<resources>
|
||||
|
||||
<style name="ThemeOverlay.Notesnook.AppWidgetContainer" parent="">
|
||||
<item name="appWidgetBackgroundColor">@color/light_blue_900</item>
|
||||
<item name="appWidgetTextColor">@color/light_blue_200</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -5,5 +5,4 @@
|
||||
<color name="light_blue_600">#FF039BE5</color>
|
||||
<color name="light_blue_900">#FF01579B</color>
|
||||
<color name="bootsplash_background">#FFFFFF</color>
|
||||
<color name="bootsplash_background_dark">#1f1f1f</color>
|
||||
</resources>
|
||||
@@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="logo_dark_background">#1F1F1F</color>
|
||||
</resources>
|
||||
@@ -3,5 +3,4 @@
|
||||
<string name="title_activity_share">NotesnookShare</string>
|
||||
<string name="appwidget_text">EXAMPLE</string>
|
||||
<string name="add_widget">Add widget</string>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -17,11 +17,11 @@
|
||||
</style>
|
||||
|
||||
<!-- BootTheme should inherit from Theme.SplashScreen -->
|
||||
<style name="BootTheme" parent="Theme.SplashScreen">
|
||||
<item name="windowSplashScreenBackground">@color/bootsplash_background</item>
|
||||
<item name="windowSplashScreenAnimatedIcon">@mipmap/bootsplash_logo</item>
|
||||
<item name="postSplashScreenTheme">@style/AppTheme</item>
|
||||
</style>
|
||||
<style name="BootTheme" parent="Theme.SplashScreen">
|
||||
<item name="windowSplashScreenBackground">@color/bootsplash_background</item>
|
||||
<item name="windowSplashScreenAnimatedIcon">@mipmap/bootsplash_logo</item>
|
||||
<item name="postSplashScreenTheme">@style/AppTheme</item>
|
||||
</style>
|
||||
|
||||
<!-- Base application theme. -->
|
||||
|
||||
|
||||
@@ -61,7 +61,8 @@
|
||||
"react-native-pdf": "6.6.2",
|
||||
"react-native-blob-util": "0.17.3",
|
||||
"@ammarahmed/react-native-share-extension": "^2.5.5",
|
||||
"react-native-in-app-review": "4.3.3"
|
||||
"react-native-in-app-review": "4.3.3",
|
||||
"react-native-swiper-flatlist": "3.2.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@react-native/eslint-config": "^0.72.2",
|
||||
|
||||
11
apps/mobile/package-lock.json
generated
@@ -13,13 +13,8 @@
|
||||
"app/"
|
||||
],
|
||||
"dependencies": {
|
||||
"buffer": "6.0.3",
|
||||
"deprecated-react-native-prop-types": "^4.1.0",
|
||||
"react": "18.2.0",
|
||||
"react-native": "0.72.0",
|
||||
"react-native-mmkv-storage": "^0.9.1",
|
||||
"react-native-reanimated": "^3.3.0",
|
||||
"react-native-swiper-flatlist": "3.2.2"
|
||||
"react-native": "0.72.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"otplib": "12.0.1",
|
||||
@@ -38,6 +33,7 @@
|
||||
"absolutify": "^0.1.0",
|
||||
"buffer": "^6.0.3",
|
||||
"dayjs": "^1.10.4",
|
||||
"deprecated-react-native-prop-types": "^4.1.0",
|
||||
"entities": "^3.0.1",
|
||||
"fflate": "^0.7.3",
|
||||
"html-to-text": "9.0.5",
|
||||
@@ -119,6 +115,7 @@
|
||||
"react-native-securerandom": "^1.0.1",
|
||||
"react-native-share": "^7.2.0",
|
||||
"react-native-svg": "^12.3.0",
|
||||
"react-native-swiper-flatlist": "3.2.2",
|
||||
"react-native-tooltips": "^1.0.3",
|
||||
"react-native-vector-icons": "9.2.0",
|
||||
"react-native-webview": "^11.14.1",
|
||||
@@ -28685,6 +28682,7 @@
|
||||
"absolutify": "^0.1.0",
|
||||
"buffer": "^6.0.3",
|
||||
"dayjs": "^1.10.4",
|
||||
"deprecated-react-native-prop-types": "^4.1.0",
|
||||
"entities": "^3.0.1",
|
||||
"fflate": "^0.7.3",
|
||||
"html-to-text": "9.0.5",
|
||||
@@ -28801,6 +28799,7 @@
|
||||
"react-native-securerandom": "^1.0.1",
|
||||
"react-native-share": "^7.2.0",
|
||||
"react-native-svg": "^12.3.0",
|
||||
"react-native-swiper-flatlist": "3.2.2",
|
||||
"react-native-tooltips": "^1.0.3",
|
||||
"react-native-vector-icons": "9.2.0",
|
||||
"react-native-webview": "^11.14.1",
|
||||
|
||||
@@ -33,12 +33,7 @@
|
||||
"@notesnook/core": "*",
|
||||
"@notesnook/editor": "*",
|
||||
"@notesnook/editor-mobile": "*",
|
||||
"react-native-swiper-flatlist": "3.2.2",
|
||||
"@notesnook/logger": "*",
|
||||
"@notesnook/common": "*",
|
||||
"react-native-mmkv-storage": "^0.9.1",
|
||||
"react-native-reanimated": "^3.3.0",
|
||||
"deprecated-react-native-prop-types": "^4.1.0",
|
||||
"buffer": "6.0.3"
|
||||
"@notesnook/common": "*"
|
||||
}
|
||||
}
|
||||
|
||||