fix(plugins/settings): fix resetSettingsScreen
This commit is contained in:
parent
bf3c95b16e
commit
3947b8f07e
1 changed files with 6 additions and 6 deletions
|
|
@ -157,20 +157,20 @@ export function resetSettingsScreen() {
|
|||
navigation.navigate('tabs')
|
||||
|
||||
setTimeout(() => {
|
||||
// This navigates to the right screen, but then navigates back to the overview screen for some reason
|
||||
navigation.dispatch(
|
||||
ReactNavigationNative.CommonActions.reset(prevState),
|
||||
)
|
||||
|
||||
// Re-push all routes, because resetting does not keep them for some reason
|
||||
|
||||
if (settings)
|
||||
for (const route of settings.state.routes) {
|
||||
// So we need to re-push all the routes
|
||||
setTimeout(() => {
|
||||
for (const route of settings.state.routes.slice(1))
|
||||
navigation.dispatch(
|
||||
ReactNavigationNative.StackActions.push(
|
||||
ReactNavigationNative.CommonActions.navigate(
|
||||
route.name,
|
||||
route.params,
|
||||
),
|
||||
)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue