每当我使用android上的后退按钮关闭应用程序,然后重新打开应用程序时,即使应用程序移至正确的屏幕,它也会卡在渲染第一个屏幕上。
_doRedirect = () => {
if (this.state.checkedSignedIn && this.state.checkedNotification) {
// we can continue
if (this.state.signedIn) {
// we're signed in, we can care about if we've received a notification
if (this.state.receivedNotification) {
// we've received a notification, redirect to that
this.props.navigation.navigate('MultiplayerNotification', { gameId: this.state.notificationData.gameId, stage: this.state.notificationData.stage })
} else {
// we haven't received a notification, go to the standard start screen
this.props.navigation.navigate('Start')
}
}
}
}
通过此代码,并导航到“开始”,但不呈现“开始”。
如果我强行关闭应用程序并重新打开它,则它可以正常工作。