mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-02 11:15:35 +03:00
fetching vesting shares after state update
This commit is contained in:
parent
418d9a630b
commit
9c0c63f639
@ -264,22 +264,27 @@ class DelegateScreen extends Component {
|
||||
const username = item;
|
||||
const { from } = this.state;
|
||||
const { intl } = this.props;
|
||||
|
||||
const _onItemPress = () => {
|
||||
if (username === from) {
|
||||
Alert.alert(
|
||||
intl.formatMessage({ id: 'transfer.username_alert' }),
|
||||
intl.formatMessage({ id: 'transfer.username_alert_detail' }),
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
this.setState({ destination: username, usersResult: [], step: 2 }, () => {
|
||||
//since method uses destination from state it sould be called
|
||||
//after state has been updated successfully
|
||||
this._fetchReceivedVestingShare();
|
||||
});
|
||||
|
||||
this.destinationTextInput.current?.blur();
|
||||
};
|
||||
|
||||
return (
|
||||
<TouchableOpacity
|
||||
onPress={() => {
|
||||
if (username === from) {
|
||||
Alert.alert(
|
||||
intl.formatMessage({ id: 'transfer.username_alert' }),
|
||||
intl.formatMessage({ id: 'transfer.username_alert_detail' }),
|
||||
);
|
||||
return;
|
||||
}
|
||||
this._fetchReceivedVestingShare();
|
||||
this.setState({ destination: username, usersResult: [], step: 2 });
|
||||
this.destinationTextInput.current?.blur();
|
||||
}}
|
||||
style={styles.usersDropItemRow}
|
||||
>
|
||||
<TouchableOpacity onPress={_onItemPress} style={styles.usersDropItemRow}>
|
||||
<UserAvatar username={username} noAction />
|
||||
<Text style={styles.usersDropItemRowText}>{username}</Text>
|
||||
</TouchableOpacity>
|
||||
|
Loading…
Reference in New Issue
Block a user