Merge pull request #989 from esteemapp/bugfix/boostPost

changed minus place and enhanced
This commit is contained in:
uğur erdal 2019-07-31 22:43:12 +03:00 committed by GitHub
commit 693f895768
2 changed files with 77 additions and 76 deletions

View File

@ -43,7 +43,6 @@ class BoostPostScreen extends PureComponent {
SCPath: '',
permlinkSuggestions: [],
isValid: false,
calculatedESTM: 150,
};
this.startActionSheet = React.createRef();
@ -192,7 +191,6 @@ class BoostPostScreen extends PureComponent {
}
/>
<Text style={styles.balanceText}>{`${balance || _balance} ESTM`}</Text>
<Fragment>
<View style={styles.autocomplateLineContainer}>
<View style={styles.autocomplateLabelContainer}>
{
@ -209,7 +207,7 @@ class BoostPostScreen extends PureComponent {
data={permlinkSuggestions}
listContainerStyle={styles.autocomplateListContainer}
listStyle={styles.autocomplateList}
onChangeText={text => this._handleOnPermlinkChange(text)}
onChangeText={this._handleOnPermlinkChange}
renderTextInput={() => (
<TextInput
style={styles.input}
@ -236,41 +234,17 @@ class BoostPostScreen extends PureComponent {
)}
/>
</View>
</Fragment>
<View style={styles.total}>
<Text style={styles.day}>
<Text style={styles.price}>
{`${getESTMPrice(calculatedESTM).toFixed(3)} $ `}
</Text>
<Text style={styles.price}>{`${calculatedESTM} ESTM`}</Text>
<Text style={styles.esteem}>{`${calculatedESTM} ESTM`}</Text>
</View>
<View
style={{
justifyContent: 'center',
alignItems: 'center',
flexDirection: 'row',
}}
>
<View style={styles.quickButtonsWrapper}>
<MainButton
style={{ width: 55, height: 55, justifyContent: 'center' }}
isDisable={!(_balance / 50 > factor + 4)}
onPress={() =>
this.setState({
factor: _balance / 50 > factor + 4 ? factor + 1 : factor,
})
}
>
<Icon
size={24}
style={{ color: 'white' }}
iconType="MaterialIcons"
name="add"
/>
</MainButton>
<MainButton
style={{ width: 55, height: 55, justifyContent: 'center' }}
style={styles.quickButtons}
isDisable={!(calculatedESTM > 150)}
onPress={() =>
this.setState({
@ -285,6 +259,23 @@ class BoostPostScreen extends PureComponent {
name="minus"
/>
</MainButton>
<MainButton
style={styles.quickButtons}
isDisable={!(_balance / 50 > factor + 4)}
onPress={() =>
this.setState({
factor: _balance / 50 > factor + 4 ? factor + 1 : factor,
})
}
>
<Icon
size={24}
style={{ color: 'white' }}
iconType="MaterialIcons"
name="add"
/>
</MainButton>
</View>
</View>

View File

@ -150,13 +150,23 @@ export default EStyleSheet.create({
justifyContent: 'center',
alignItems: 'center',
},
day: {
price: {
fontSize: 22,
color: '$primaryBlue',
fontWeight: 'bold',
},
price: {
esteem: {
fontSize: 15,
color: '$primaryBlue',
},
quickButtons: {
width: 55,
height: 55,
justifyContent: 'center',
},
quickButtonsWrapper: {
justifyContent: 'center',
alignItems: 'center',
flexDirection: 'row',
},
});