mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-11-24 00:46:27 +03:00
disabled comment reveal animation for first layers of comments
This commit is contained in:
parent
962447bf20
commit
a785b0f2b3
@ -15,12 +15,12 @@ export const CommentsSection = ({ item, index, revealReplies, ...props }) => {
|
||||
|
||||
const _renderComment = (item, index = 0) => {
|
||||
// animation makes sure there is 100 ms gab between each comment item
|
||||
const _enteringAnim = SlideInRight.duration(150)
|
||||
.springify()
|
||||
.delay(index * 100);
|
||||
const _enteringAnim = index >= 0
|
||||
? SlideInRight.duration(150).springify().delay(index * 100)
|
||||
: undefined
|
||||
|
||||
return (
|
||||
<Animated.View key={item.author + item.permlink} entering={_enteringAnim}>
|
||||
<Animated.View key={item.author + item.permlink} entering={_enteringAnim}>
|
||||
<Comment
|
||||
comment={item}
|
||||
repliesToggle={toggle}
|
||||
@ -33,7 +33,7 @@ export const CommentsSection = ({ item, index, revealReplies, ...props }) => {
|
||||
|
||||
return (
|
||||
<>
|
||||
{_renderComment(item, index)}
|
||||
{_renderComment(item, -1)}
|
||||
{toggle && item.repliesThread.map((reply, index) => _renderComment(reply, index))}
|
||||
</>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user