about summary refs log tree commit diff
path: root/src/alf/util/systemUI.ts
blob: 9e5769c4c6f5eb948e35751c3a78580b028b0937 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import * as SystemUI from 'expo-system-ui'

import {isAndroid} from '#/platform/detection'
import {type 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')
    }
  }
}