File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
2830function setRoot ( ) {
Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments