retrieve FCM token
This commit is contained in:
parent
ab97be6a4d
commit
50cab8722f
1 changed files with 21 additions and 17 deletions
|
@ -137,24 +137,28 @@ class SplashScreen extends React.PureComponent {
|
||||||
filteredOutpointsSubscribe();
|
filteredOutpointsSubscribe();
|
||||||
checkSubscriptionsInit();
|
checkSubscriptionsInit();
|
||||||
|
|
||||||
// get user settings interval
|
NativeModules.Firebase.getMessagingToken().then(fcmToken => {
|
||||||
this.getUserSettings();
|
console.log('fcmtoken=' + fcmToken);
|
||||||
setInterval(() => this.getUserSettings(), SETTINGS_GET_INTERVAL);
|
|
||||||
|
|
||||||
if (user && user.id && user.has_verified_email) {
|
// get user settings interval
|
||||||
// user already authenticated
|
this.getUserSettings();
|
||||||
NativeModules.UtilityModule.getSecureValue(Constants.KEY_FIRST_RUN_PASSWORD).then(walletPassword => {
|
setInterval(() => this.getUserSettings(), SETTINGS_GET_INTERVAL);
|
||||||
if (walletPassword) {
|
|
||||||
getSync(walletPassword);
|
if (user && user.id && user.has_verified_email) {
|
||||||
}
|
// user already authenticated
|
||||||
this.navigateToMain();
|
NativeModules.UtilityModule.getSecureValue(Constants.KEY_FIRST_RUN_PASSWORD).then(walletPassword => {
|
||||||
});
|
if (walletPassword) {
|
||||||
} else {
|
getSync(walletPassword);
|
||||||
NativeModules.VersionInfo.getAppVersion().then(appVersion => {
|
}
|
||||||
this.setState({ shouldAuthenticate: true });
|
this.navigateToMain();
|
||||||
authenticate(appVersion, Platform.OS);
|
});
|
||||||
});
|
} else {
|
||||||
}
|
NativeModules.VersionInfo.getAppVersion().then(appVersion => {
|
||||||
|
this.setState({ shouldAuthenticate: true });
|
||||||
|
authenticate(appVersion, Platform.OS);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue