mirror of
https://github.com/tooot-app/app
synced 2025-06-05 22:19:13 +02:00
Use in-memory global values
As connect needs to be read very often
This commit is contained in:
@ -24,6 +24,10 @@ import { enableFreeze } from 'react-native-screens'
|
||||
import i18n from './i18n'
|
||||
import Screens from './screens'
|
||||
|
||||
export const GLOBAL: { connect?: boolean } = {
|
||||
connect: undefined
|
||||
}
|
||||
|
||||
Platform.select({
|
||||
android: LogBox.ignoreLogs(['Setting a timer for a long period of time'])
|
||||
})
|
||||
@ -54,6 +58,7 @@ const App: React.FC = () => {
|
||||
}
|
||||
|
||||
const useConnect = getGlobalStorage.boolean('app.connect')
|
||||
GLOBAL.connect = useConnect
|
||||
log('log', 'App', `connect: ${useConnect}`)
|
||||
if (useConnect) {
|
||||
await connectVerify()
|
||||
|
Reference in New Issue
Block a user