mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-02 11:15:35 +03:00
added alert for same username selection
This commit is contained in:
parent
3442e12e24
commit
93546c8d55
@ -585,7 +585,9 @@
|
||||
"review": "Review",
|
||||
"confirm": "Confirm Delegation",
|
||||
"confirm_summary": "Delegate {hp} HP ({vests} VESTS) To @{delegator} from @{delegatee} ",
|
||||
"confirm_summary_para": "This will overwrite your previous delegation of {prev} HP to this user.
"
|
||||
"confirm_summary_para": "This will overwrite your previous delegation of {prev} HP to this user.",
|
||||
"username_alert": "Username Error!",
|
||||
"username_alert_detail": "Please select different username"
|
||||
},
|
||||
"boost": {
|
||||
"title": "Get Points",
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React, { Component, Fragment } from 'react';
|
||||
import { View, Text, Platform, ScrollView, KeyboardAvoidingView } from 'react-native';
|
||||
import { View, Text, Platform, ScrollView, KeyboardAvoidingView, Alert } from 'react-native';
|
||||
import { WebView } from 'react-native-webview';
|
||||
import { injectIntl } from 'react-intl';
|
||||
import Slider from '@esteemapp/react-native-slider';
|
||||
@ -237,9 +237,18 @@ class DelegateScreen extends Component {
|
||||
|
||||
_renderUsersDropdownItem = ({ item }) => {
|
||||
const username = item;
|
||||
const { from } = this.state;
|
||||
const { intl } = this.props;
|
||||
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();
|
||||
|
Loading…
Reference in New Issue
Block a user