From 15cf29d952446ea80e2c1017dc14658a40103a8e Mon Sep 17 00:00:00 2001 From: Zhiyuan Zheng Date: Fri, 19 Mar 2021 21:44:52 +0100 Subject: [PATCH] Remove all FastImage --- src/components/GracefullyImage.tsx | 2 +- src/components/Parse/Emojis.tsx | 5 ++--- src/screens/Compose/DraftsList/Root.tsx | 4 ++-- src/screens/Compose/EditAttachment/Image.tsx | 5 ++--- src/screens/Compose/Root/Footer/Attachments.tsx | 12 +++++++++--- src/screens/Tabs.tsx | 5 ++--- src/screens/Tabs/Shared/Account/Header.tsx | 5 ++--- .../Tabs/Shared/Account/Information/Avatar.tsx | 2 +- 8 files changed, 21 insertions(+), 19 deletions(-) diff --git a/src/components/GracefullyImage.tsx b/src/components/GracefullyImage.tsx index 33f658a5..f7da33b2 100644 --- a/src/components/GracefullyImage.tsx +++ b/src/components/GracefullyImage.tsx @@ -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 diff --git a/src/components/Parse/Emojis.tsx b/src/components/Parse/Emojis.tsx index 00ce337c..c27d4407 100644 --- a/src/components/Parse/Emojis.tsx +++ b/src/components/Parse/Emojis.tsx @@ -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( {/* When emoji starts a paragraph, lineHeight will break */} {i === 0 ? : null} - = ({ timestamp }) => { {item.attachments?.uploads.length ? ( {item.attachments.uploads.map((attachment, index) => ( - = ({ index }) => { return ( <> - { key={index} style={[styles.container, { width: calculateWidth(item) }]} > - case 'Tab-Me': return instanceActive !== -1 ? ( - = ({ account, limitHeight = false }) => { const topInset = useSafeAreaInsets().top return ( - = ({ account, myInfo }) => { )