mirror of
https://github.com/tooot-app/app
synced 2025-06-05 22:19:13 +02:00
Trying out expo 43
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import axios from 'axios'
|
||||
import chalk from 'chalk'
|
||||
import { Constants } from 'react-native-unimodules'
|
||||
import Constants from 'expo-constants'
|
||||
import * as Sentry from 'sentry-expo'
|
||||
|
||||
const ctx = new chalk.Instance({ level: 3 })
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { RootState } from '@root/store'
|
||||
import axios, { AxiosRequestConfig } from 'axios'
|
||||
import chalk from 'chalk'
|
||||
import Constants from 'expo-constants'
|
||||
import li from 'li'
|
||||
import { Constants } from 'react-native-unimodules'
|
||||
|
||||
const ctx = new chalk.Instance({ level: 3 })
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import axios from 'axios'
|
||||
import chalk from 'chalk'
|
||||
import { Constants } from 'react-native-unimodules'
|
||||
import Constants from 'expo-constants'
|
||||
import * as Sentry from 'sentry-expo'
|
||||
|
||||
const ctx = new chalk.Instance({ level: 3 })
|
||||
|
@ -2,11 +2,12 @@ import haptics from '@components/haptics'
|
||||
import { displayMessage } from '@components/Message'
|
||||
import CameraRoll from '@react-native-community/cameraroll'
|
||||
import { RootStackParamList } from '@utils/navigation/navigators'
|
||||
import * as FileSystem from 'expo-file-system'
|
||||
import * as MediaLibrary from 'expo-media-library'
|
||||
import i18next from 'i18next'
|
||||
import { RefObject } from 'react'
|
||||
import { Platform } from 'react-native'
|
||||
import FlashMessage from 'react-native-flash-message'
|
||||
import { FileSystem, Permissions } from 'react-native-unimodules'
|
||||
|
||||
type CommonProps = {
|
||||
messageRef: RefObject<FlashMessage>
|
||||
@ -60,17 +61,15 @@ const saveIos = async ({ messageRef, mode, image }: CommonProps) => {
|
||||
|
||||
const saveAndroid = async ({ messageRef, mode, image }: CommonProps) => {
|
||||
const fileUri: string = `${FileSystem.documentDirectory}${image.id}.jpg`
|
||||
const downloadedFile: FileSystem.FileSystemDownloadResult = await FileSystem.downloadAsync(
|
||||
image.url,
|
||||
fileUri
|
||||
)
|
||||
const downloadedFile: FileSystem.FileSystemDownloadResult =
|
||||
await FileSystem.downloadAsync(image.url, fileUri)
|
||||
|
||||
if (downloadedFile.status != 200) {
|
||||
console.warn('error!')
|
||||
}
|
||||
|
||||
const perm = await Permissions.askAsync(Permissions.MEDIA_LIBRARY)
|
||||
if (perm.status != 'granted') {
|
||||
const perm = await MediaLibrary.requestPermissionsAsync()
|
||||
if (!perm.granted) {
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -5,10 +5,10 @@ import {
|
||||
} from '@utils/slices/settingsSlice'
|
||||
import { StyleConstants } from '@utils/styles/constants'
|
||||
import { useTheme } from '@utils/styles/ThemeManager'
|
||||
import Constants from 'expo-constants'
|
||||
import React from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { StyleSheet, Text } from 'react-native'
|
||||
import { Constants } from 'react-native-unimodules'
|
||||
import { useDispatch, useSelector } from 'react-redux'
|
||||
|
||||
const SettingsAnalytics: React.FC = () => {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import Constants from 'expo-constants'
|
||||
import * as Updates from 'expo-updates'
|
||||
import { Constants } from 'react-native-unimodules'
|
||||
import * as Sentry from 'sentry-expo'
|
||||
import log from './log'
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import apiGeneral from '@api/general'
|
||||
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit'
|
||||
import { RootState } from '@root/store'
|
||||
import { Constants } from 'react-native-unimodules'
|
||||
import Constants from 'expo-constants'
|
||||
|
||||
export const retriveVersionLatest = createAsyncThunk(
|
||||
'version/latest',
|
||||
|
Reference in New Issue
Block a user