fix DM footer ease in animation
This commit is contained in:
@@ -13,7 +13,6 @@ import {
|
|||||||
KeyboardGestureArea,
|
KeyboardGestureArea,
|
||||||
} from 'react-native-keyboard-controller'
|
} from 'react-native-keyboard-controller'
|
||||||
import Animated, {
|
import Animated, {
|
||||||
FadeIn,
|
|
||||||
runOnJS,
|
runOnJS,
|
||||||
type ScrollEvent,
|
type ScrollEvent,
|
||||||
type SharedValue,
|
type SharedValue,
|
||||||
@@ -188,6 +187,14 @@ export function MessagesList({
|
|||||||
}
|
}
|
||||||
}, [hasScrolled, listOpacity])
|
}, [hasScrolled, listOpacity])
|
||||||
|
|
||||||
|
// Recreate FadeIn for the footer with a shared value so we can start from a
|
||||||
|
// non-zero opacity instead of fully transparent. (Needed for GlassView to work properly)
|
||||||
|
const footerOpacity = useSharedValue(0.05)
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
footerOpacity.set(withTiming(1, {duration: 200}))
|
||||||
|
}, [footerOpacity])
|
||||||
|
|
||||||
const inputHeightUI = useSharedValue(0)
|
const inputHeightUI = useSharedValue(0)
|
||||||
const [inputHeightJS, setInputHeightJS] = useState(0)
|
const [inputHeightJS, setInputHeightJS] = useState(0)
|
||||||
|
|
||||||
@@ -754,6 +761,10 @@ export function MessagesList({
|
|||||||
opacity: listOpacity.get(),
|
opacity: listOpacity.get(),
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
const animatedFooterStyle = useAnimatedStyle(() => ({
|
||||||
|
opacity: footerOpacity.get(),
|
||||||
|
}))
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<InviteLinkDialogProvider convo={convoState.convo}>
|
<InviteLinkDialogProvider convo={convoState.convo}>
|
||||||
<MessageRepliesProvider scrollToMessage={scrollToMessage}>
|
<MessageRepliesProvider scrollToMessage={scrollToMessage}>
|
||||||
@@ -842,7 +853,7 @@ export function MessagesList({
|
|||||||
opened: 0,
|
opened: 0,
|
||||||
}}>
|
}}>
|
||||||
{footer ?? (
|
{footer ?? (
|
||||||
<Animated.View entering={FadeIn.duration(200)}>
|
<Animated.View style={animatedFooterStyle}>
|
||||||
<ConversationFooter
|
<ConversationFooter
|
||||||
convoState={convoState}
|
convoState={convoState}
|
||||||
hasAcceptOverride={hasAcceptOverride}>
|
hasAcceptOverride={hasAcceptOverride}>
|
||||||
|
|||||||
Reference in New Issue
Block a user