about summary refs log tree commit diff
path: root/src/alf/util/systemUI.ts
blob: c973e10ea6c134e94f8349adfd1df603c54a1626 (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 {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')
    }
  }
}