From 92052ec359a977a514916e4f434441181968f6e1 Mon Sep 17 00:00:00 2001 From: struc Date: Mon, 2 Sep 2024 20:06:24 +0000 Subject: [PATCH 1/2] fix: iOS chat view, remove animation Signed-off-by: struc --- src/pages/home/report/ReportActionsList.tsx | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/pages/home/report/ReportActionsList.tsx b/src/pages/home/report/ReportActionsList.tsx index 676c27ec59715..9148d31431ff3 100644 --- a/src/pages/home/report/ReportActionsList.tsx +++ b/src/pages/home/report/ReportActionsList.tsx @@ -7,7 +7,7 @@ import {DeviceEventEmitter, InteractionManager} from 'react-native'; import type {LayoutChangeEvent, NativeScrollEvent, NativeSyntheticEvent, StyleProp, ViewStyle} from 'react-native'; import {useOnyx} from 'react-native-onyx'; import type {OnyxEntry} from 'react-native-onyx'; -import Animated, {useAnimatedStyle, useSharedValue, withTiming} from 'react-native-reanimated'; +import Animated from 'react-native-reanimated'; import InvertedFlatList from '@components/InvertedFlatList'; import {AUTOSCROLL_TO_TOP_THRESHOLD} from '@components/InvertedFlatList/BaseInvertedFlatList'; import {usePersonalDetails} from '@components/OnyxProvider'; @@ -164,7 +164,6 @@ function ReportActionsList({ const {isOffline} = useNetwork(); const route = useRoute>(); - const opacity = useSharedValue(0); const reportScrollManager = useReportScrollManager(); const userActiveSince = useRef(DateUtils.getDBTime()); const lastMessageTime = useRef(null); @@ -300,14 +299,6 @@ function ReportActionsList({ const isLastPendingActionIsDelete = sortedReportActions?.[0]?.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE; const [isFloatingMessageCounterVisible, setIsFloatingMessageCounterVisible] = useState(false); - const animatedStyles = useAnimatedStyle(() => ({ - opacity: opacity.value, - })); - - useEffect(() => { - // eslint-disable-next-line react-compiler/react-compiler - opacity.value = withTiming(1, {duration: 100}); - }, [opacity]); useEffect(() => { if ( @@ -652,7 +643,7 @@ function ReportActionsList({ isActive={(isFloatingMessageCounterVisible && !!unreadMarkerReportActionID) || canScrollToNewerComments} onClick={scrollToBottomAndMarkReportAsRead} /> - + Date: Mon, 2 Sep 2024 20:06:24 +0000 Subject: [PATCH 2/2] improve: Replace Animated.View with View Signed-off-by: struc --- src/pages/home/report/ReportActionsList.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/pages/home/report/ReportActionsList.tsx b/src/pages/home/report/ReportActionsList.tsx index 9148d31431ff3..b747454942727 100644 --- a/src/pages/home/report/ReportActionsList.tsx +++ b/src/pages/home/report/ReportActionsList.tsx @@ -3,11 +3,10 @@ import {useIsFocused, useRoute} from '@react-navigation/native'; import type {RouteProp} from '@react-navigation/native'; import type {DebouncedFunc} from 'lodash'; import React, {memo, useCallback, useEffect, useMemo, useRef, useState} from 'react'; -import {DeviceEventEmitter, InteractionManager} from 'react-native'; +import {DeviceEventEmitter, InteractionManager, View} from 'react-native'; import type {LayoutChangeEvent, NativeScrollEvent, NativeSyntheticEvent, StyleProp, ViewStyle} from 'react-native'; import {useOnyx} from 'react-native-onyx'; import type {OnyxEntry} from 'react-native-onyx'; -import Animated from 'react-native-reanimated'; import InvertedFlatList from '@components/InvertedFlatList'; import {AUTOSCROLL_TO_TOP_THRESHOLD} from '@components/InvertedFlatList/BaseInvertedFlatList'; import {usePersonalDetails} from '@components/OnyxProvider'; @@ -643,7 +642,7 @@ function ReportActionsList({ isActive={(isFloatingMessageCounterVisible && !!unreadMarkerReportActionID) || canScrollToNewerComments} onClick={scrollToBottomAndMarkReportAsRead} /> - + - + ); }