diff options
Diffstat (limited to 'src/alf')
-rw-r--r-- | src/alf/util/navigationBar.ts | 21 | ||||
-rw-r--r-- | src/alf/util/systemUI.ts | 14 |
2 files changed, 14 insertions, 21 deletions
diff --git a/src/alf/util/navigationBar.ts b/src/alf/util/navigationBar.ts deleted file mode 100644 index cb315f70a..000000000 --- a/src/alf/util/navigationBar.ts +++ /dev/null @@ -1,21 +0,0 @@ -import * as NavigationBar from 'expo-navigation-bar' -import * as SystemUI from 'expo-system-ui' - -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') - SystemUI.setBackgroundColorAsync(t.atoms.bg.backgroundColor) - } else { - NavigationBar.setBackgroundColorAsync('black') - NavigationBar.setBorderColorAsync('black') - NavigationBar.setButtonStyleAsync('light') - SystemUI.setBackgroundColorAsync('black') - } - } -} 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') + } + } +} |