Skip to content

Commit 88898ef

Browse files
committed
More fixes for PR
1 parent fac5413 commit 88898ef

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

playground/src/app.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ function start() {
2121
registerScreens();
2222
addProcessors();
2323
setDefaultOptions();
24-
Navigation.dismissAllModals();
25-
setRoot();
24+
Navigation.events().registerAppLaunchedListener(async () => {
25+
Navigation.dismissAllModals();
26+
setRoot();
27+
});
2628
}
2729

2830
function setRoot() {

playground/src/screens/StackCommandsScreen.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,16 @@ export default class StackCommandsScreen extends NavigationComponent<NavigationP
4747
this.setState({
4848
pushPromiseResult: `push promise resolved with: ${pushId}`,
4949
});
50-
return Navigation.pop('ChildId');
50+
return pushId;
5151
})
52+
// FIXME: remove this timeout
53+
.then((popId) => new Promise<string>((resolve) => setTimeout(() => resolve(popId), 500)))
54+
.then((popId) => Navigation.pop(popId))
5255
.then((popId) => {
5356
this.setState({
5457
popPromiseResult: `pop promise resolved with: ${popId}`,
5558
});
56-
});
59+
})
60+
.catch((err) => console.log(err));
5761
};
5862
}

0 commit comments

Comments
 (0)