Merge pull request #1241 from esteemapp/bugfix/android-splash

Bugfix/android splash
This commit is contained in:
Mustafa Buyukcelebi 2019-11-11 22:55:18 +03:00 committed by GitHub
commit 66af429b2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 272 additions and 256 deletions

View File

@ -165,6 +165,8 @@ class NotificationView extends PureComponent {
rightIconType="MaterialIcons"
onRightIconPress={readAllNotification}
/>
<ThemeContainer>
{({ isDarkTheme }) => (
<FlatList
data={_notifications}
refreshing={isNotificationRefreshing}
@ -174,8 +176,6 @@ class NotificationView extends PureComponent {
ListFooterComponent={this._renderFooterLoading}
ListEmptyComponent={<ListPlaceHolder />}
refreshControl={
<ThemeContainer>
{({ isDarkTheme }) => (
<RefreshControl
refreshing={isNotificationRefreshing}
progressBackgroundColor="#357CE6"
@ -183,8 +183,6 @@ class NotificationView extends PureComponent {
titleColor="#fff"
colors={['#fff']}
/>
)}
</ThemeContainer>
}
renderItem={({ item, index }) => (
<Fragment>
@ -198,6 +196,8 @@ class NotificationView extends PureComponent {
</Fragment>
)}
/>
)}
</ThemeContainer>
</View>
);
}

View File

@ -40,12 +40,10 @@ class PointsView extends Component {
// Component Functions
refreshControl = () => {
refreshControl = ({ isDarkTheme }) => {
const { fetchUserActivity, refreshing } = this.props;
return (
<ThemeContainer>
{isDarkTheme => (
<RefreshControl
refreshing={refreshing}
onRefresh={fetchUserActivity}
@ -54,8 +52,6 @@ class PointsView extends Component {
titleColor="#fff"
colors={['#fff']}
/>
)}
</ThemeContainer>
);
};
@ -100,7 +96,12 @@ class PointsView extends Component {
return (
<Fragment>
<LineBreak height={12} />
<ScrollView style={styles.scrollContainer} refreshControl={this.refreshControl()}>
<ThemeContainer>
{isDarkTheme => (
<ScrollView
style={styles.scrollContainer}
refreshControl={this.refreshControl({ isDarkTheme })}
>
<View style={styles.pointsWrapper}>
<Text onPress={this._showDropdown} style={styles.pointText}>
{get(userPoints, 'points')}
@ -122,7 +123,9 @@ class PointsView extends Component {
dropdownStyle={styles.dropdownStyle}
/>
</View>
<Text style={styles.subText}>{intl.formatMessage({ id: 'points.esteemPoints' })}</Text>
<Text style={styles.subText}>
{intl.formatMessage({ id: 'points.esteemPoints' })}
</Text>
<MainButton
isLoading={isClaiming}
@ -135,7 +138,9 @@ class PointsView extends Component {
>
<View style={styles.mainButtonWrapper}>
<Text style={styles.unclaimedText}>
{unclaimedPoints > 0 ? unclaimedPoints : intl.formatMessage({ id: 'boost.buy' })}
{unclaimedPoints > 0
? unclaimedPoints
: intl.formatMessage({ id: 'boost.buy' })}
</Text>
<View style={styles.mainIconWrapper}>
<Icon name="add" iconType="MaterialIcons" color="#357ce6" size={23} />
@ -188,7 +193,9 @@ class PointsView extends Component {
>
<View style={styles.popoverWrapper}>
<Text style={styles.popoverText}>
{this._getTranslation(get(POINTS[get(item, 'type')], 'descriptionKey'))}
{this._getTranslation(
get(POINTS[get(item, 'type')], 'descriptionKey'),
)}
</Text>
</View>
</Popover>
@ -229,9 +236,15 @@ class PointsView extends Component {
isThin
text={
get(item, 'sender')
? `${intl.formatMessage({ id: 'points.from' })} @${get(item, 'sender')}`
? `${intl.formatMessage({ id: 'points.from' })} @${get(
item,
'sender',
)}`
: get(item, 'receiver') &&
`${intl.formatMessage({ id: 'points.to' })} @${get(item, 'receiver')}`
`${intl.formatMessage({ id: 'points.to' })} @${get(
item,
'receiver',
)}`
}
description={get(item, 'memo')}
/>
@ -241,6 +254,8 @@ class PointsView extends Component {
/>
</View>
</ScrollView>
)}
</ThemeContainer>
</Fragment>
);
}

View File

@ -376,6 +376,8 @@ class PostsView extends Component {
/>
)}
<ThemeContainer>
{({ isDarkTheme }) => (
<FlatList
data={posts}
showsVerticalScrollIndicator={false}
@ -395,8 +397,6 @@ class PostsView extends Component {
onScrollEndDrag={this._handleOnScroll}
ListEmptyComponent={this._renderEmptyContent}
refreshControl={
<ThemeContainer>
{({ isDarkTheme }) => (
<RefreshControl
refreshing={refreshing}
onRefresh={this._handleOnRefreshPosts}
@ -405,13 +405,13 @@ class PostsView extends Component {
titleColor="#fff"
colors={['#fff']}
/>
)}
</ThemeContainer>
}
ref={ref => {
this.flatList = ref;
}}
/>
)}
</ThemeContainer>
</View>
);
}

View File

@ -58,12 +58,12 @@ class WalletView extends PureComponent {
} = this.props;
return (
<ThemeContainer>
{isDarkTheme => (
<ScrollView
onScroll={handleOnScroll && handleOnScroll}
style={styles.scrollView}
refreshControl={
<ThemeContainer>
{isDarkTheme => (
<RefreshControl
refreshing={isRefreshing}
onRefresh={handleOnWalletRefresh}
@ -72,8 +72,6 @@ class WalletView extends PureComponent {
titleColor="#fff"
colors={['#fff']}
/>
)}
</ThemeContainer>
}
>
{!walletData ? (
@ -128,6 +126,8 @@ class WalletView extends PureComponent {
</Fragment>
)}
</ScrollView>
)}
</ThemeContainer>
);
}
}

View File

@ -5,5 +5,6 @@ export default EStyleSheet.create({
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '$pureWhite',
},
});