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": {
|
"lbryinc": {
|
||||||
"version": "github:lbryio/lbryinc#aebad10a9c5d725c3fedae4236d56f239a0bc1de",
|
"version": "github:lbryio/lbryinc#27b6fcb8391b54cc9ea4d0a52a6ee536e39aa166",
|
||||||
"from": "github:lbryio/lbryinc#aebad10a9c5d725c3fedae4236d56f239a0bc1de",
|
"from": "github:lbryio/lbryinc#27b6fcb8391b54cc9ea4d0a52a6ee536e39aa166",
|
||||||
"requires": {
|
"requires": {
|
||||||
"reselect": "^3.0.0"
|
"reselect": "^3.0.0"
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
"@expo/vector-icons": "^8.1.0",
|
"@expo/vector-icons": "^8.1.0",
|
||||||
"gfycat-style-urls": "^1.0.3",
|
"gfycat-style-urls": "^1.0.3",
|
||||||
"lbry-redux": "lbryio/lbry-redux#8ac92e3abfa0a9aacdb2fa4a144c3fadc4da6b11",
|
"lbry-redux": "lbryio/lbry-redux#8ac92e3abfa0a9aacdb2fa4a144c3fadc4da6b11",
|
||||||
"lbryinc": "lbryio/lbryinc#aebad10a9c5d725c3fedae4236d56f239a0bc1de",
|
"lbryinc": "lbryio/lbryinc#27b6fcb8391b54cc9ea4d0a52a6ee536e39aa166",
|
||||||
"lodash": ">=4.17.11",
|
"lodash": ">=4.17.11",
|
||||||
"merge": ">=1.2.1",
|
"merge": ">=1.2.1",
|
||||||
"moment": "^2.22.1",
|
"moment": "^2.22.1",
|
||||||
|
|
|
@ -91,8 +91,10 @@ class SplashScreen extends React.PureComponent {
|
||||||
// user is authenticated, navigate to the main view
|
// user is authenticated, navigate to the main view
|
||||||
if (user.has_verified_email) {
|
if (user.has_verified_email) {
|
||||||
NativeModules.UtilityModule.getSecureValue(Constants.KEY_WALLET_PASSWORD).then(walletPassword => {
|
NativeModules.UtilityModule.getSecureValue(Constants.KEY_WALLET_PASSWORD).then(walletPassword => {
|
||||||
getSync(walletPassword, () => this.getUserSettings());
|
getSync(walletPassword, () => {
|
||||||
this.navigateToMain();
|
this.getUserSettings();
|
||||||
|
this.navigateToMain();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -138,8 +140,10 @@ class SplashScreen extends React.PureComponent {
|
||||||
if (user && user.id && user.has_verified_email) {
|
if (user && user.id && user.has_verified_email) {
|
||||||
// user already authenticated
|
// user already authenticated
|
||||||
NativeModules.UtilityModule.getSecureValue(Constants.KEY_WALLET_PASSWORD).then(walletPassword => {
|
NativeModules.UtilityModule.getSecureValue(Constants.KEY_WALLET_PASSWORD).then(walletPassword => {
|
||||||
getSync(walletPassword, () => this.getUserSettings());
|
getSync(walletPassword, () => {
|
||||||
this.navigateToMain();
|
this.getUserSettings();
|
||||||
|
this.navigateToMain();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
NativeModules.VersionInfo.getAppVersion().then(appVersion => {
|
NativeModules.VersionInfo.getAppVersion().then(appVersion => {
|
||||||
|
|
Loading…
Reference in a new issue