Notification OK when app closed

This commit is contained in:
Brice Zele 2020-09-30 07:03:08 +01:00
parent e126780bd9
commit b29b30ec6a
2 changed files with 25 additions and 17 deletions

1
App.js
View File

@ -440,6 +440,7 @@ class App extends React.Component {
goToScreen = (routeName, params, isReset = true) => { goToScreen = (routeName, params, isReset = true) => {
const { navigator } = this.refs; const { navigator } = this.refs;
console.log("APP HAS LOADED", global.appHasLoaded);
if (global.appHasLoaded) { if (global.appHasLoaded) {
navigator.dispatch({ navigator.dispatch({
type: "Navigation/NAVIGATE", type: "Navigation/NAVIGATE",

View File

@ -52,6 +52,12 @@ export default class SplashScreen extends Component {
} }
}; };
workUserResult(result) { workUserResult(result) {
console.log("SPLASHSCREEN PROPS", this.props);
if (this.props.navigation.state.params.hasOwnProperty('routeName')) {
this.props.navigation.navigate(this.props.navigation.state.params.routeName, {
id: this.props.navigation.state.params.params.id
});
} else {
var way = ""; var way = "";
var way2 = ""; var way2 = "";
if (result === null || result === undefined) { if (result === null || result === undefined) {
@ -73,6 +79,7 @@ export default class SplashScreen extends Component {
way2 = route.login way2 = route.login
} }
this.props.navigation.navigate(way) this.props.navigation.navigate(way)
}
/* Navigation.setStackRoot(route.stackRoot, /* Navigation.setStackRoot(route.stackRoot,
{ component: { { component: {