mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-11-24 00:46:27 +03:00
Merge pull request #2784 from ecency/nt/comment-list-keys
Nt/comment list keys
This commit is contained in:
commit
6f77c299a0
@ -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))}
|
||||
</>
|
||||
);
|
||||
|
@ -317,7 +317,7 @@ const PostComments = forwardRef(
|
||||
contentContainerStyle={styles.listContent}
|
||||
ListHeaderComponent={_postContentView}
|
||||
ListEmptyComponent={_renderEmptyContent}
|
||||
data={isPostLoading ? [] : sortedSections}
|
||||
data={isPostLoading ? [] : sortedSections.slice()}
|
||||
onContentSizeChange={_onContentSizeChange}
|
||||
estimatedItemSize={104}
|
||||
renderItem={_renderItem}
|
||||
|
Loading…
Reference in New Issue
Block a user