From 839e2306103eb11e287d461a892515e4996eb3c1 Mon Sep 17 00:00:00 2001 From: Mustafa Buyukcelebi Date: Wed, 30 Oct 2019 16:08:24 +0300 Subject: [PATCH] Fixed android animation splash design. Fixed android crash issue --- .../notification/view/notificationView.js | 48 +-- src/components/points/view/pointsView.js | 307 +++++++++--------- src/components/posts/view/postsView.js | 63 ++-- src/components/wallet/view/walletView.js | 116 +++---- src/screens/launch/screen/launchStyles.js | 1 + 5 files changed, 273 insertions(+), 262 deletions(-) diff --git a/src/components/notification/view/notificationView.js b/src/components/notification/view/notificationView.js index 178f49816..547d731bc 100644 --- a/src/components/notification/view/notificationView.js +++ b/src/components/notification/view/notificationView.js @@ -165,17 +165,17 @@ class NotificationView extends PureComponent { rightIconType="MaterialIcons" onRightIconPress={readAllNotification} /> - getActivities()} - keyExtractor={item => item.title} - onEndReached={() => getActivities(null, selectedFilter, true)} - ListFooterComponent={this._renderFooterLoading} - ListEmptyComponent={} - refreshControl={ - - {({ isDarkTheme }) => ( + + {({ isDarkTheme }) => ( + getActivities()} + keyExtractor={item => item.title} + onEndReached={() => getActivities(null, selectedFilter, true)} + ListFooterComponent={this._renderFooterLoading} + ListEmptyComponent={} + refreshControl={ + } + renderItem={({ item, index }) => ( + + + {this._renderList(item.notifications)} + )} - - } - renderItem={({ item, index }) => ( - - - {this._renderList(item.notifications)} - + /> )} - /> + ); } diff --git a/src/components/points/view/pointsView.js b/src/components/points/view/pointsView.js index 47e525494..6f95fb18f 100644 --- a/src/components/points/view/pointsView.js +++ b/src/components/points/view/pointsView.js @@ -40,22 +40,18 @@ class PointsView extends Component { // Component Functions - refreshControl = () => { + refreshControl = ({ isDarkTheme }) => { const { fetchUserActivity, refreshing } = this.props; return ( - - {isDarkTheme => ( - - )} - + ); }; @@ -100,147 +96,166 @@ class PointsView extends Component { return ( - - - - {get(userPoints, 'points')} - - - - {intl.formatMessage({ id: 'points.esteemPoints' })} - - - unclaimedPoints > 0 ? claimPoints() : navigation.navigate(ROUTES.SCREENS.BOOST) - } - > - - - {unclaimedPoints > 0 ? unclaimedPoints : intl.formatMessage({ id: 'boost.buy' })} - - - + + {isDarkTheme => ( + + + + {get(userPoints, 'points')} + + - - + + {intl.formatMessage({ id: 'points.esteemPoints' })} + - - get(item, 'type', Math.random()).toString()} - horizontal - renderItem={({ item }) => ( - - {({ - openPopover, - closePopover, - popoverVisible, - setPopoverAnchor, - popoverAnchorRect, - }) => ( - - - - - - - - {this._getTranslation(get(POINTS[get(item, 'type')], 'nameKey'))} - - closePopover()} - fromRect={popoverAnchorRect} - placement="top" - supportedOrientations={['portrait', 'landscape']} - > - - - {this._getTranslation(get(POINTS[get(item, 'type')], 'descriptionKey'))} + + unclaimedPoints > 0 ? claimPoints() : navigation.navigate(ROUTES.SCREENS.BOOST) + } + > + + + {unclaimedPoints > 0 + ? unclaimedPoints + : intl.formatMessage({ id: 'boost.buy' })} + + + + + + + + + get(item, 'type', Math.random()).toString()} + horizontal + renderItem={({ item }) => ( + + {({ + openPopover, + closePopover, + popoverVisible, + setPopoverAnchor, + popoverAnchorRect, + }) => ( + + + + + + + + {this._getTranslation(get(POINTS[get(item, 'type')], 'nameKey'))} + closePopover()} + fromRect={popoverAnchorRect} + placement="top" + supportedOrientations={['portrait', 'landscape']} + > + + + {this._getTranslation( + get(POINTS[get(item, 'type')], 'descriptionKey'), + )} + + + - - + )} + )} - - )} - /> - + /> + - - item.id.toString()} - ListEmptyComponent={this._renderLoading()} - renderItem={({ item, index }) => ( - - } - > - {(get(item, 'memo') || get(item, 'sender')) && ( - + item.id.toString()} + ListEmptyComponent={this._renderLoading()} + renderItem={({ item, index }) => ( + } - description={get(item, 'memo')} - /> + > + {(get(item, 'memo') || get(item, 'sender')) && ( + + )} + )} - - )} - /> - - + /> + + + )} + ); } diff --git a/src/components/posts/view/postsView.js b/src/components/posts/view/postsView.js index 28d7985fc..a3bd12a72 100644 --- a/src/components/posts/view/postsView.js +++ b/src/components/posts/view/postsView.js @@ -359,12 +359,7 @@ class PostsView extends Component { render() { const { refreshing, posts, isShowFilterBar } = this.state; - const { - filterOptions, - selectedOptionIndex, - isHideImage, - handleImagesHide, - } = this.props; + const { filterOptions, selectedOptionIndex, isHideImage, handleImagesHide } = this.props; return ( @@ -381,27 +376,27 @@ class PostsView extends Component { /> )} - - get(item, 'author', null) && ( - - ) - } - keyExtractor={(content, i) => `${get(content, 'permlink', '')}${i.toString()}`} - onEndReached={() => this._loadPosts()} - removeClippedSubviews - refreshing={refreshing} - onRefresh={() => this._handleOnRefreshPosts()} - onEndThreshold={0} - initialNumToRender={10} - ListFooterComponent={this._renderFooter} - onScrollEndDrag={this._handleOnScroll} - ListEmptyComponent={this._renderEmptyContent} - refreshControl={ - - {({ isDarkTheme }) => ( + + {({ isDarkTheme }) => ( + + get(item, 'author', null) && ( + + ) + } + keyExtractor={(content, i) => `${get(content, 'permlink', '')}${i.toString()}`} + onEndReached={() => this._loadPosts()} + removeClippedSubviews + refreshing={refreshing} + onRefresh={() => this._handleOnRefreshPosts()} + onEndThreshold={0} + initialNumToRender={10} + ListFooterComponent={this._renderFooter} + onScrollEndDrag={this._handleOnScroll} + ListEmptyComponent={this._renderEmptyContent} + refreshControl={ - )} - - } - ref={ref => { - this.flatList = ref; - }} - /> + } + ref={ref => { + this.flatList = ref; + }} + /> + )} + ); } diff --git a/src/components/wallet/view/walletView.js b/src/components/wallet/view/walletView.js index 5c9d64f22..f08c605a3 100644 --- a/src/components/wallet/view/walletView.js +++ b/src/components/wallet/view/walletView.js @@ -58,12 +58,12 @@ class WalletView extends PureComponent { } = this.props; return ( - - {isDarkTheme => ( + + {isDarkTheme => ( + - )} - - } - > - {!walletData ? ( - - - - ) : ( - - {walletData.hasUnclaimedRewards && ( - - {currentAccountUsername === selectedUsername ? ( - claimRewardBalance()} + } + > + {!walletData ? ( + + + + ) : ( + + {walletData.hasUnclaimedRewards && ( + - - {this._getUnclaimedText(walletData)} - - - - - - ) : ( - this._getUnclaimedText(walletData, true) + {currentAccountUsername === selectedUsername ? ( + claimRewardBalance()} + > + + {this._getUnclaimedText(walletData)} + + + + + + ) : ( + this._getUnclaimedText(walletData, true) + )} + )} - + + + + + )} - - - - - + )} - + ); } } diff --git a/src/screens/launch/screen/launchStyles.js b/src/screens/launch/screen/launchStyles.js index 474f80476..c98439d5b 100644 --- a/src/screens/launch/screen/launchStyles.js +++ b/src/screens/launch/screen/launchStyles.js @@ -5,5 +5,6 @@ export default EStyleSheet.create({ flex: 1, justifyContent: 'center', alignItems: 'center', + backgroundColor: '$pureWhite', }, });