This repository was archived by the owner on Feb 23, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +13
-8
lines changed Expand file tree Collapse file tree 2 files changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -12,15 +12,20 @@ class NavAction {
1212 }
1313
1414 setTopLevelNavigator ( navigatorRef ) {
15- this . _navigate = ( routeName , params ) =>
16- navigatorRef . dispatch ( this . _navActions . navigate ( { routeName, params } ) ) ;
17- this . _reset = ( routeName , params ) =>
15+ this . _navigate = routeName =>
16+ navigatorRef . dispatch ( this . _navActions . navigate ( { routeName } ) ) ;
17+
18+ this . _reset = ( stackName , routeName ) =>
1819 navigatorRef . dispatch (
19- this . _stackActions . reset ( {
20- index : 0 ,
21- actions : [ this . _navActions . navigate ( { routeName, params } ) ] ,
20+ this . _navActions . navigate ( {
21+ routeName : stackName ,
22+ action : this . _stackActions . reset ( {
23+ index : 0 ,
24+ actions : [ this . _navActions . navigate ( { routeName } ) ] ,
25+ } ) ,
2226 } )
2327 ) ;
28+
2429 this . _store . navReady = true ;
2530 }
2631
@@ -86,7 +91,7 @@ class NavAction {
8691
8792 goHome ( ) {
8893 this . _navigate ( 'Home' ) ;
89- this . _reset ( 'Home' ) ;
94+ this . _reset ( 'Main' , ' Home') ;
9095 }
9196
9297 goPay ( ) {
Original file line number Diff line number Diff line change @@ -193,6 +193,7 @@ const MainStack = createStackNavigator(
193193 NewAddress,
194194 Password,
195195 LoaderSyncing,
196+ Home,
196197 Settings,
197198 SettingsUnit,
198199 SettingsFiat,
@@ -244,7 +245,6 @@ const ChannelStack = createStackNavigator(
244245
245246const RootStack = createStackNavigator (
246247 {
247- Home,
248248 Main : MainStack ,
249249 Invoice : InvoiceStack ,
250250 Pay : PayStack ,
You can’t perform that action at this time.
0 commit comments