diff options
author | Samuel Newman <mozzius@protonmail.com> | 2024-11-26 23:59:31 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-26 23:59:31 +0000 |
commit | 8825d6b1a7d13e6b3ac0719258d976f3a7cfc454 (patch) | |
tree | 060bca018a53ce5794961f9cbc54f52de315dc7e /src/alf | |
parent | 2c2d12b3949dfbb26e8fadecfe9dfecfe3f6962d (diff) | |
download | voidsky-8825d6b1a7d13e6b3ac0719258d976f3a7cfc454.tar.zst |
Lightbox status bar behaviour (#6637)
* lightbox status bar * add hideTransitionAnimation="slide" * move navigation bar logic to util
Diffstat (limited to 'src/alf')
-rw-r--r-- | src/alf/util/navigationBar.ts | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/alf/util/navigationBar.ts b/src/alf/util/navigationBar.ts new file mode 100644 index 000000000..face86983 --- /dev/null +++ b/src/alf/util/navigationBar.ts @@ -0,0 +1,18 @@ +import * as NavigationBar from 'expo-navigation-bar' + +import {isAndroid} from '#/platform/detection' +import {Theme} from '../types' + +export function setNavigationBar(themeType: 'theme' | 'lightbox', t: Theme) { + if (isAndroid) { + if (themeType === 'theme') { + NavigationBar.setBackgroundColorAsync(t.atoms.bg.backgroundColor) + NavigationBar.setBorderColorAsync(t.atoms.bg.backgroundColor) + NavigationBar.setButtonStyleAsync(t.name !== 'light' ? 'light' : 'dark') + } else { + NavigationBar.setBackgroundColorAsync('black') + NavigationBar.setBorderColorAsync('black') + NavigationBar.setButtonStyleAsync('light') + } + } +} |