Merge pull request #69 from lbryio/wait-for-sync
wait for getSync to complete and apply user settings
This commit is contained in:
commit
b4fc61ada0
3 changed files with 11 additions and 7 deletions
4
package-lock.json
generated
4
package-lock.json
generated
|
@ -5649,8 +5649,8 @@
|
|||
}
|
||||
},
|
||||
"lbryinc": {
|
||||
"version": "github:lbryio/lbryinc#aebad10a9c5d725c3fedae4236d56f239a0bc1de",
|
||||
"from": "github:lbryio/lbryinc#aebad10a9c5d725c3fedae4236d56f239a0bc1de",
|
||||
"version": "github:lbryio/lbryinc#27b6fcb8391b54cc9ea4d0a52a6ee536e39aa166",
|
||||
"from": "github:lbryio/lbryinc#27b6fcb8391b54cc9ea4d0a52a6ee536e39aa166",
|
||||
"requires": {
|
||||
"reselect": "^3.0.0"
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
"@expo/vector-icons": "^8.1.0",
|
||||
"gfycat-style-urls": "^1.0.3",
|
||||
"lbry-redux": "lbryio/lbry-redux#8ac92e3abfa0a9aacdb2fa4a144c3fadc4da6b11",
|
||||
"lbryinc": "lbryio/lbryinc#aebad10a9c5d725c3fedae4236d56f239a0bc1de",
|
||||
"lbryinc": "lbryio/lbryinc#27b6fcb8391b54cc9ea4d0a52a6ee536e39aa166",
|
||||
"lodash": ">=4.17.11",
|
||||
"merge": ">=1.2.1",
|
||||
"moment": "^2.22.1",
|
||||
|
|
|
@ -91,9 +91,11 @@ class SplashScreen extends React.PureComponent {
|
|||
// user is authenticated, navigate to the main view
|
||||
if (user.has_verified_email) {
|
||||
NativeModules.UtilityModule.getSecureValue(Constants.KEY_WALLET_PASSWORD).then(walletPassword => {
|
||||
getSync(walletPassword, () => this.getUserSettings());
|
||||
getSync(walletPassword, () => {
|
||||
this.getUserSettings();
|
||||
this.navigateToMain();
|
||||
});
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -138,9 +140,11 @@ class SplashScreen extends React.PureComponent {
|
|||
if (user && user.id && user.has_verified_email) {
|
||||
// user already authenticated
|
||||
NativeModules.UtilityModule.getSecureValue(Constants.KEY_WALLET_PASSWORD).then(walletPassword => {
|
||||
getSync(walletPassword, () => this.getUserSettings());
|
||||
getSync(walletPassword, () => {
|
||||
this.getUserSettings();
|
||||
this.navigateToMain();
|
||||
});
|
||||
});
|
||||
} else {
|
||||
NativeModules.VersionInfo.getAppVersion().then(appVersion => {
|
||||
this.setState({ shouldAuthenticate: true });
|
||||
|
|
Loading…
Reference in a new issue