TP-74862 | removed delay on fab icon and header (#12697)

This commit is contained in:
Somarapu Vamshi
2024-09-23 20:03:14 +05:30
committed by GitHub
parent 6037f49beb
commit ec820de631

View File

@@ -73,32 +73,23 @@ const QuoteOfferScreen = ({
const fabTextStyle = useAnimatedStyle(() => {
return {
maxWidth: withDelay(
50,
withTiming(
derivedY.value < lastScrollPosition.value || derivedY.value <= 0
? 120
: 0,
{ duration: 100 },
),
maxWidth: withTiming(
derivedY.value < lastScrollPosition.value || derivedY.value <= 0
? 120
: 0,
{ duration: 100 },
),
paddingRight: withDelay(
50,
withTiming(
derivedY.value < lastScrollPosition.value || derivedY.value <= 0
? 16
: 0,
{ duration: 100 },
),
paddingRight: withTiming(
derivedY.value < lastScrollPosition.value || derivedY.value <= 0
? 16
: 0,
{ duration: 100 },
),
opacity: withDelay(
50,
withTiming(
derivedY.value < lastScrollPosition.value || derivedY.value <= 0
? 1
: 0,
{ duration: 100 },
),
opacity: withTiming(
derivedY.value < lastScrollPosition.value || derivedY.value <= 0
? 1
: 0,
{ duration: 100 },
),
};
});
@@ -113,14 +104,12 @@ const QuoteOfferScreen = ({
const headerBgStyle = useAnimatedStyle(() => {
if (!animateHeader) return { backgroundColor: Colors.white };
return {
backgroundColor: withTiming(
backgroundColor:
derivedY.value > HEADER_LOTTIE_WIDGET_HEIGHT
? Colors.grey
: derivedY.value > HEADER_LOTTIE_TITLE_HEIGHT
? Colors.aliceBlue
: Colors.transparent,
{ duration: 50 },
),
};
});