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 => { .catch(error => {
if (sentry) { if (sentry) {
Sentry.Native.captureException(error, { extra: error }) Sentry.Native.setExtras(error.response)
Sentry.Native.captureException(error)
} }
if (error.response) { if (error.response) {

View File

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

View File

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

View File

@ -280,7 +280,14 @@ const ScreenCompose: React.FC<ScreenComposeProp> = ({
composePost(params, composeState) composePost(params, composeState)
.then(() => { .then(() => {
haptics('Success') 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 = [ const queryKey: QueryKeyTimeline = [
'Timeline', 'Timeline',
{ page: 'Following' } { page: 'Following' }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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