about summary refs log tree commit diff
path: root/src/alf/util/systemUI.ts
diff options
context:
space:
mode:
authorMathieu Acthernoene <zoontek@gmail.com>2025-04-22 18:16:50 +0200
committerGitHub <noreply@github.com>2025-04-22 19:16:50 +0300
commita770f5635b549f2a87ffeaedd031dfe8e37b58c8 (patch)
tree2e935d294227e57b2e81ba79ba96a6a85f268971 /src/alf/util/systemUI.ts
parent6e80b340c825900524bfe981ba29cfd0c6cf5934 (diff)
downloadvoidsky-a770f5635b549f2a87ffeaedd031dfe8e37b58c8.tar.zst
Edge to edge support (#7497)
Diffstat (limited to 'src/alf/util/systemUI.ts')
-rw-r--r--src/alf/util/systemUI.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/alf/util/systemUI.ts b/src/alf/util/systemUI.ts
new file mode 100644
index 000000000..c973e10ea
--- /dev/null
+++ b/src/alf/util/systemUI.ts
@@ -0,0 +1,14 @@
+import * as SystemUI from 'expo-system-ui'
+
+import {isAndroid} from '#/platform/detection'
+import {Theme} from '../types'
+
+export function setSystemUITheme(themeType: 'theme' | 'lightbox', t: Theme) {
+  if (isAndroid) {
+    if (themeType === 'theme') {
+      SystemUI.setBackgroundColorAsync(t.atoms.bg.backgroundColor)
+    } else {
+      SystemUI.setBackgroundColorAsync('black')
+    }
+  }
+}