mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-22 12:51:42 +03:00
Login screen fixed for offline mode
This commit is contained in:
parent
5ef3253618
commit
8a513ecd0c
@ -203,7 +203,9 @@
|
||||
"no_internet": "No connection!",
|
||||
"confirm": "Confirm",
|
||||
"removed": "Removed",
|
||||
"same_user": "This user already added to list"
|
||||
"same_user": "This user already added to list",
|
||||
"unknow_error": "An error occurred",
|
||||
"error": "Error"
|
||||
},
|
||||
"post": {
|
||||
"reblog_alert": "Are you sure you want to reblog?",
|
||||
|
@ -108,13 +108,29 @@ class LoginContainer extends PureComponent {
|
||||
};
|
||||
|
||||
_getAccountsWithUsername = async username => {
|
||||
const { intl, isConnected } = this.props;
|
||||
|
||||
if (isConnected) {
|
||||
return null;
|
||||
}
|
||||
|
||||
try {
|
||||
const validUsers = await lookupAccounts(username);
|
||||
|
||||
return validUsers;
|
||||
} catch (error) {
|
||||
Alert.alert(
|
||||
intl.formatMessage({ id: 'alert.error' }),
|
||||
intl.formatMessage({ d: 'alert.unknow_error' }),
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
_handleSignUp = () => {
|
||||
const { intl } = this.props;
|
||||
|
||||
Linking.openURL('https://signup.steemit.com/?ref=esteem').catch(err =>
|
||||
alert('An error occurred', err),
|
||||
Alert.alert(intl.formatMessage({ id: 'alert.error' }), err.message),
|
||||
);
|
||||
};
|
||||
|
||||
@ -137,6 +153,7 @@ const mapStateToProps = state => ({
|
||||
account: state.accounts,
|
||||
notificationDetails: state.application.notificationDetails,
|
||||
notificationSettings: state.application.isNotificationOpen,
|
||||
isConnected: state.application.isConnected,
|
||||
});
|
||||
|
||||
export default injectIntl(connect(mapStateToProps)(LoginContainer));
|
||||
|
Loading…
Reference in New Issue
Block a user