about summary refs log tree commit diff
path: root/plugins
diff options
context:
space:
mode:
authorEric Bailey <git@esb.lol>2024-03-21 11:53:01 -0500
committerGitHub <noreply@github.com>2024-03-21 11:53:01 -0500
commit7503d83eaa5ac35b06c7223ff6395f9dadc63c0f (patch)
treed80b81d71569a365f465d7ec417ec02018c7e9bb /plugins
parent396d183dfcc303eb5056eca52f7cd62254f8f5c4 (diff)
downloadvoidsky-7503d83eaa5ac35b06c7223ff6395f9dadc63c0f.tar.zst
Fix android splash jump (#3316)
* Setup translucent status bar of splash screen on android (#3300)

Co-authored-by: Eric Bailey <git@esb.lol>

* Fix conflict better

---------

Co-authored-by: Eiichi Yoshikawa <edo@bari-ikutsu.com>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/withAndroidSplashScreenStatusBarTranslucentPlugin.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/plugins/withAndroidSplashScreenStatusBarTranslucentPlugin.js b/plugins/withAndroidSplashScreenStatusBarTranslucentPlugin.js
new file mode 100644
index 000000000..704ead054
--- /dev/null
+++ b/plugins/withAndroidSplashScreenStatusBarTranslucentPlugin.js
@@ -0,0 +1,28 @@
+const {withStringsXml, AndroidConfig} = require('@expo/config-plugins')
+
+module.exports = function withAndroidSplashScreenStatusBarTranslucentPlugin(
+  appConfig,
+) {
+  return withStringsXml(appConfig, function (decoratedAppConfig) {
+    try {
+      decoratedAppConfig.modResults = AndroidConfig.Strings.setStringItem(
+        [
+          {
+            _: 'true',
+            $: {
+              name: 'expo_splash_screen_status_bar_translucent',
+              translatable: 'false',
+            },
+          },
+        ],
+        decoratedAppConfig.modResults,
+      )
+    } catch (e) {
+      console.error(
+        `withAndroidSplashScreenStatusBarTranslucentPlugin failed`,
+        e,
+      )
+    }
+    return decoratedAppConfig
+  })
+}