1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Added fastlane and other updates

This commit is contained in:
Zhiyuan Zheng
2021-01-31 03:09:35 +01:00
parent 253ddee319
commit 1072d88191
43 changed files with 755 additions and 185 deletions

View File

@ -2,16 +2,30 @@ import { createAsyncThunk, createSlice, PayloadAction } from '@reduxjs/toolkit'
import { RootState } from '@root/store'
import * as Analytics from 'expo-firebase-analytics'
import * as Localization from 'expo-localization'
import { pickBy } from 'lodash'
enum availableLanguages {
'zh-Hans',
'en'
}
export type SettingsState = {
language: 'zh-Hans' | 'en'
language: keyof availableLanguages
theme: 'light' | 'dark' | 'auto'
browser: 'internal' | 'external'
analytics: boolean
}
export const settingsInitialState = {
language: Localization.locale,
language: Object.keys(
pickBy(availableLanguages, (_, key) => Localization.locale.includes(key))
)
? Object.keys(
pickBy(availableLanguages, (_, key) =>
Localization.locale.includes(key)
)
)[0]
: 'en',
theme: 'auto',
browser: 'internal',
analytics: true