Skip to content

Commit

Permalink
fix: πŸ› remove typing indicator from tree when not typing
Browse files Browse the repository at this point in the history
βœ… Closes: #1819
  • Loading branch information
xcarpentier committed Jun 24, 2020
1 parent e9a6935 commit d83c800
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions src/TypingIndicator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,11 @@ const TypingIndicator = ({ isTyping }: Props) => {
}),
]).start()
}
const opacity = yCoords.interpolate({
inputRange: [0, 200],
outputRange: [1, 0],
})
return (
<Animated.View
style={[
styles.container,
{
opacity,
transform: [
{
translateY: yCoords,
Expand All @@ -86,12 +81,14 @@ const TypingIndicator = ({ isTyping }: Props) => {
},
]}
>
<TypingAnimation
style={{ marginLeft: 6, marginTop: 7.2 }}
dotRadius={4}
dotMargin={5.5}
dotColor={'rgba(0, 0, 0, 0.38)'}
/>
{isTyping ? (
<TypingAnimation
style={{ marginLeft: 6, marginTop: 7.2 }}
dotRadius={4}
dotMargin={5.5}
dotColor={'rgba(0, 0, 0, 0.38)'}
/>
) : null}
</Animated.View>
)
}
Expand Down

0 comments on commit d83c800

Please sign in to comment.