From 32d7ff4b60745fa181e34a474e27ede1213976c5 Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Fri, 18 Jul 2025 10:40:08 -0600 Subject: [PATCH] Revert "Revert "Fix splitted transactions don't show immediately"" --- src/hooks/useAnimatedHighlightStyle/index.ts | 41 +++++++++----------- src/libs/actions/IOU.ts | 3 +- 2 files changed, 21 insertions(+), 23 deletions(-) diff --git a/src/hooks/useAnimatedHighlightStyle/index.ts b/src/hooks/useAnimatedHighlightStyle/index.ts index abf2e52fc29..93b326e6027 100644 --- a/src/hooks/useAnimatedHighlightStyle/index.ts +++ b/src/hooks/useAnimatedHighlightStyle/index.ts @@ -1,5 +1,4 @@ import React, {useState} from 'react'; -import {InteractionManager} from 'react-native'; import {Easing, interpolate, interpolateColor, runOnJS, useAnimatedStyle, useSharedValue, withDelay, withSequence, withTiming} from 'react-native-reanimated'; import useScreenWrapperTransitionStatus from '@hooks/useScreenWrapperTransitionStatus'; import useTheme from '@hooks/useTheme'; @@ -95,27 +94,25 @@ export default function useAnimatedHighlightStyle({ return; } setStartHighlight(false); - InteractionManager.runAfterInteractions(() => { - runOnJS(() => { - nonRepeatableProgress.set( - withDelay( - itemEnterDelay, - withTiming(1, {duration: itemEnterDuration, easing: Easing.inOut(Easing.ease)}, (finished) => { - if (!finished) { - return; - } - - repeatableProgress.set( - withSequence( - withDelay(highlightStartDelay, withTiming(1, {duration: highlightStartDuration, easing: Easing.inOut(Easing.ease)})), - withDelay(highlightEndDelay, withTiming(0, {duration: highlightEndDuration, easing: Easing.inOut(Easing.ease)})), - ), - ); - }), - ), - ); - })(); - }); + runOnJS(() => { + nonRepeatableProgress.set( + withDelay( + itemEnterDelay, + withTiming(1, {duration: itemEnterDuration, easing: Easing.inOut(Easing.ease)}, (finished) => { + if (!finished) { + return; + } + + repeatableProgress.set( + withSequence( + withDelay(highlightStartDelay, withTiming(1, {duration: highlightStartDuration, easing: Easing.inOut(Easing.ease)})), + withDelay(highlightEndDelay, withTiming(0, {duration: highlightEndDuration, easing: Easing.inOut(Easing.ease)})), + ), + ); + }), + ), + ); + })(); }, [ didScreenTransitionEnd, startHighlight, diff --git a/src/libs/actions/IOU.ts b/src/libs/actions/IOU.ts index 703776b396a..deb46f04471 100644 --- a/src/libs/actions/IOU.ts +++ b/src/libs/actions/IOU.ts @@ -11923,8 +11923,9 @@ function saveSplitTransactions(draftTransaction: OnyxEntry