From 8a589d0d9d5c19756d82011c6acbc035a305177f Mon Sep 17 00:00:00 2001 From: Radek Czemerys Date: Wed, 14 Oct 2020 19:03:27 +0200 Subject: [PATCH] fix: white flash before js bundle is loaded --- android/app/src/main/res/values/colors.xml | 4 ++++ android/app/src/main/res/values/styles.xml | 1 + ios/LaunchScreen.storyboard | 12 +++++++++--- ios/StandardNotes/AppDelegate.m | 5 +++++ 4 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 android/app/src/main/res/values/colors.xml diff --git a/android/app/src/main/res/values/colors.xml b/android/app/src/main/res/values/colors.xml new file mode 100644 index 00000000..1967a36e --- /dev/null +++ b/android/app/src/main/res/values/colors.xml @@ -0,0 +1,4 @@ + + + #2E2E2E + \ No newline at end of file diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml index 62fe59fa..66f68f96 100644 --- a/android/app/src/main/res/values/styles.xml +++ b/android/app/src/main/res/values/styles.xml @@ -4,6 +4,7 @@ diff --git a/ios/LaunchScreen.storyboard b/ios/LaunchScreen.storyboard index 878949f2..2856c493 100644 --- a/ios/LaunchScreen.storyboard +++ b/ios/LaunchScreen.storyboard @@ -1,10 +1,11 @@ - + - + + @@ -15,8 +16,8 @@ - + @@ -24,4 +25,9 @@ + + + + + diff --git a/ios/StandardNotes/AppDelegate.m b/ios/StandardNotes/AppDelegate.m index 2360ff76..c9310583 100644 --- a/ios/StandardNotes/AppDelegate.m +++ b/ios/StandardNotes/AppDelegate.m @@ -48,6 +48,11 @@ rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; + if (@available(iOS 13.0, *)) { + [rootView setBackgroundColor:[UIColor systemBackgroundColor]]; + } else { + [rootView setBackgroundColor:[UIColor blackColor]]; + } UIViewController *rootViewController = [UIViewController new]; rootViewController.view = rootView; self.window.rootViewController = rootViewController;