From c7e1a70236b8910ba975f96eadc4defb7222d222 Mon Sep 17 00:00:00 2001 From: Elias Nahum Date: Fri, 20 Jul 2018 16:58:38 -0400 Subject: [PATCH] Recycle the post list (#1938) --- app/components/post/post.js | 56 +++++++++++++-------------- app/components/post_list/post_list.js | 2 +- 2 files changed, 27 insertions(+), 31 deletions(-) diff --git a/app/components/post/post.js b/app/components/post/post.js index f1a180727..e41d765ba 100644 --- a/app/components/post/post.js +++ b/app/components/post/post.js @@ -415,9 +415,6 @@ export default class Post extends PureComponent { const onUsernamePress = Config.ExperimentalUsernamePressIsMention ? this.autofillUserMention : this.viewUserProfile; const mergeMessage = consecutivePost && !hasComments; - // postWidth = deviceWidth - profilePic width - profilePictureContainer margins - right column margin - const postWidth = this.props.deviceWidth - 66; - let postHeader; let userProfile; let consecutiveStyle; @@ -480,33 +477,31 @@ export default class Post extends PureComponent { {!commentedOnPost && this.renderReplyBar()} {postHeader} - - - + @@ -518,6 +513,7 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { return { container: { flexDirection: 'row', + overflow: 'hidden', }, pendingPost: { opacity: 0.5, diff --git a/app/components/post_list/post_list.js b/app/components/post_list/post_list.js index 51b205317..32994fc5d 100644 --- a/app/components/post_list/post_list.js +++ b/app/components/post_list/post_list.js @@ -358,7 +358,7 @@ export default class PostList extends PureComponent { ListFooterComponent={this.props.renderFooter} onEndReached={onEndReached} onEndReachedThreshold={Platform.OS === 'ios' ? 0 : 1} - removeClippedSubviews={Platform.OS === 'android'} + removeClippedSubviews={true} {...refreshControl} renderItem={this.renderItem} contentContainerStyle={styles.postListContent}