Merge pull request #71 from tooot-app/nightly-210319

Nightly 210319
This commit is contained in:
xmflsct 2021-03-20 00:03:40 +01:00 committed by GitHub
commit 3607a2799b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 31 additions and 21 deletions

View File

@ -60,7 +60,8 @@ const apiGeneral = async <T = unknown>({
})
.catch(error => {
if (sentry) {
Sentry.Native.captureException(error, { extra: error })
Sentry.Native.setExtras(error.response)
Sentry.Native.captureException(error)
}
if (error.response) {

View File

@ -19,7 +19,7 @@ import { Blurhash } from 'react-native-blurhash'
export interface Props {
hidden?: boolean
uri: { preview?: string; original: string; remote?: string }
uri: { preview?: string; original?: string; remote?: string }
blurhash?: string
dimension?: { width: number; height: number }
onPress?: () => void

View File

@ -3,8 +3,7 @@ import { StyleConstants } from '@utils/styles/constants'
import { adaptiveScale } from '@utils/styles/scaling'
import { useTheme } from '@utils/styles/ThemeManager'
import React, { useMemo } from 'react'
import { StyleSheet, Text } from 'react-native'
import FastImage from 'react-native-fast-image'
import { Image, StyleSheet, Text } from 'react-native'
import { useSelector } from 'react-redux'
const regexEmoji = new RegExp(/(:[A-Za-z0-9_]+:)/)
@ -70,7 +69,7 @@ const ParseEmojis = React.memo(
<Text key={i}>
{/* When emoji starts a paragraph, lineHeight will break */}
{i === 0 ? <Text> </Text> : null}
<FastImage
<Image
key={adaptiveFontsize}
source={{ uri: emojis[emojiIndex].url }}
style={styles.image}

View File

@ -280,7 +280,14 @@ const ScreenCompose: React.FC<ScreenComposeProp> = ({
composePost(params, composeState)
.then(() => {
haptics('Success')
dispatch(updateStoreReview(1))
if (
Platform.OS === 'ios' &&
Platform.constants.osVersion === '13.3'
) {
// https://github.com/tooot-app/app/issues/59
} else {
dispatch(updateStoreReview(1))
}
const queryKey: QueryKeyTimeline = [
'Timeline',
{ page: 'Following' }

View File

@ -13,6 +13,7 @@ import React, { useCallback, useContext, useState } from 'react'
import { useTranslation } from 'react-i18next'
import {
Dimensions,
Image,
Modal,
Platform,
Pressable,
@ -20,7 +21,6 @@ import {
Text,
View
} from 'react-native'
import FastImage from 'react-native-fast-image'
import { PanGestureHandler } from 'react-native-gesture-handler'
import { SwipeListView } from 'react-native-swipe-list-view'
import { useDispatch, useSelector } from 'react-redux'
@ -112,7 +112,7 @@ const ComposeDraftsListRoot: React.FC<Props> = ({ timestamp }) => {
{item.attachments?.uploads.length ? (
<View style={styles.attachments}>
{item.attachments.uploads.map((attachment, index) => (
<FastImage
<Image
key={index}
style={[
styles.attachment,

View File

@ -2,8 +2,7 @@ import { StyleConstants } from '@utils/styles/constants'
import { useTheme } from '@utils/styles/ThemeManager'
import React, { useContext } from 'react'
import { useTranslation } from 'react-i18next'
import { Dimensions, StyleSheet, Text, View } from 'react-native'
import FastImage from 'react-native-fast-image'
import { Dimensions, Image, StyleSheet, Text, View } from 'react-native'
import { PanGestureHandler } from 'react-native-gesture-handler'
import Animated, {
Extrapolate,
@ -120,7 +119,7 @@ const ComposeEditAttachmentImage: React.FC<Props> = ({ index }) => {
return (
<>
<View style={styles.base}>
<FastImage
<Image
style={{
width: imageDimensionis.width,
height: imageDimensionis.height

View File

@ -15,9 +15,15 @@ import React, {
useRef
} from 'react'
import { useTranslation } from 'react-i18next'
import { FlatList, Pressable, StyleSheet, Text, View } from 'react-native'
import {
FlatList,
Image,
Pressable,
StyleSheet,
Text,
View
} from 'react-native'
import { Circle } from 'react-native-animated-spinkit'
import FastImage from 'react-native-fast-image'
import ComposeContext from '../../utils/createContext'
import { ExtendedAttachment } from '../../utils/types'
import addAttachment from './addAttachment'
@ -113,7 +119,7 @@ const ComposeAttachments: React.FC = () => {
key={index}
style={[styles.container, { width: calculateWidth(item) }]}
>
<FastImage
<Image
style={styles.image}
source={{
uri: item.local?.local_thumbnail || item.remote?.preview_url

View File

@ -13,8 +13,7 @@ import {
} from '@utils/slices/instancesSlice'
import { useTheme } from '@utils/styles/ThemeManager'
import React, { useCallback, useMemo } from 'react'
import { Platform } from 'react-native'
import FastImage from 'react-native-fast-image'
import { Image, Platform } from 'react-native'
import { useSelector } from 'react-redux'
import TabLocal from './Tabs/Local'
import TabMe from './Tabs/Me'
@ -69,7 +68,7 @@ const ScreenTabs = React.memo(
return <Icon name='Bell' size={size} color={color} />
case 'Tab-Me':
return instanceActive !== -1 ? (
<FastImage
<Image
source={{
uri: instanceAccount?.avatarStatic
}}

View File

@ -1,7 +1,6 @@
import { useTheme } from '@utils/styles/ThemeManager'
import React, { useContext } from 'react'
import { Dimensions } from 'react-native'
import FastImage from 'react-native-fast-image'
import { Dimensions, Image } from 'react-native'
import { useSafeAreaInsets } from 'react-native-safe-area-context'
import AccountContext from './utils/createContext'
@ -16,7 +15,7 @@ const AccountHeader: React.FC<Props> = ({ account, limitHeight = false }) => {
const topInset = useSafeAreaInsets().top
return (
<FastImage
<Image
source={{ uri: account?.header }}
style={{
height:

View File

@ -28,7 +28,7 @@ const AccountInformationAvatar: React.FC<Props> = ({ account, myInfo }) => {
<GracefullyImage
key={account?.avatar}
style={styles.image}
uri={{ original: account?.avatar || '' }}
uri={{ original: account?.avatar }}
/>
</Pressable>
)