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

Improve auto fetch

This commit is contained in:
xmflsct
2023-02-08 19:22:20 +01:00
parent 724cd76647
commit 48481a4cd5
10 changed files with 30 additions and 23 deletions

View File

@ -1,5 +1,5 @@
import { GLOBAL } from '@utils/storage'
import axios from 'axios'
import { GLOBAL } from '../../App'
import { ctx, handleError, PagedResponse, parseHeaderLinks, userAgent } from './helpers'
import { CONNECT_DOMAIN } from './helpers/connect'

View File

@ -1,9 +1,9 @@
import { mapEnvironment } from '@utils/helpers/checkEnvironment'
import { GLOBAL } from '@utils/storage'
import { setGlobalStorage } from '@utils/storage/actions'
import axios from 'axios'
import parse from 'url-parse'
import { userAgent } from '.'
import { GLOBAL } from '../../../App'
const list = [
'n61owz4leck',

View File

@ -1,10 +1,10 @@
import * as Sentry from '@sentry/react-native'
import { GLOBAL } from '@utils/storage'
import { setGlobalStorage } from '@utils/storage/actions'
import chalk from 'chalk'
import Constants from 'expo-constants'
import { Platform } from 'react-native'
import parse from 'url-parse'
import { GLOBAL } from '../../../App'
const userAgent = {
'User-Agent': `tooot/${Constants.expoConfig?.version} ${Platform.OS}/${Platform.Version}`

View File

@ -1,7 +1,7 @@
import { GLOBAL } from '@utils/storage'
import { getAccountDetails } from '@utils/storage/actions'
import { StorageGlobal } from '@utils/storage/global'
import axios, { AxiosRequestConfig } from 'axios'
import { GLOBAL } from '../../App'
import { ctx, handleError, PagedResponse, parseHeaderLinks, userAgent } from './helpers'
import { CONNECT_DOMAIN } from './helpers/connect'

View File

@ -4,3 +4,7 @@ import { MMKV } from 'react-native-mmkv'
export const storage: { global: MMKV; account?: MMKV } = { global: new MMKV(), account: undefined }
export const secureStorage = createSecureStore()
export const GLOBAL: { connect?: boolean } = {
connect: undefined
}