feat: add prune option to pop action to match v5 behaviour

This commit is contained in:
Satyajit Sahoo
2020-03-16 16:37:20 +01:00
parent 37a664b433
commit 5927f4287f
5 changed files with 65 additions and 20 deletions

View File

@@ -341,7 +341,7 @@ export default class StackView extends React.Component<Props, State> {
// This will happen in when the route was closed from the card component
// e.g. When the close animation triggered from a gesture ends
// @ts-ignore
navigation.dispatch(StackActions.pop({ key: route.key }));
navigation.dispatch(StackActions.pop({ key: route.key, prune: false }));
} else {
// While closing route we need to point to the previous one assuming that
// this previous one in routes array