|  | @@ -56,6 +56,7 @@ static NSString* const setDefaultOptions	= @"setDefaultOptions";
 | 
	
		
			
			| 56 | 56 |  	
 | 
	
		
			
			| 57 | 57 |  	UIApplication.sharedApplication.delegate.window.rootViewController = vc;
 | 
	
		
			
			| 58 | 58 |  	[UIApplication.sharedApplication.delegate.window makeKeyAndVisible];
 | 
	
		
			
			|  | 59 | +	[_eventEmitter sendOnNavigationCommandCompletion:setRoot params:@{@"layout": layout}];
 | 
	
		
			
			| 59 | 60 |  	completion();
 | 
	
		
			
			| 60 | 61 |  }
 | 
	
		
			
			| 61 | 62 |  
 | 
	
	
		
			
			|  | @@ -128,6 +129,7 @@ static NSString* const setDefaultOptions	= @"setDefaultOptions";
 | 
	
		
			
			| 128 | 129 |  	} else {
 | 
	
		
			
			| 129 | 130 |  		[_eventEmitter sendOnNavigationCommand:push params:@{@"componentId": componentId}];
 | 
	
		
			
			| 130 | 131 |  		[_navigationStackManager push:newVc onTop:componentId completion:^{
 | 
	
		
			
			|  | 132 | +			[_eventEmitter sendOnNavigationCommandCompletion:push params:@{@"componentId": componentId}];
 | 
	
		
			
			| 131 | 133 |  			completion();
 | 
	
		
			
			| 132 | 134 |  		} rejection:rejection];
 | 
	
		
			
			| 133 | 135 |  	}
 | 
	
	
		
			
			|  | @@ -138,7 +140,9 @@ static NSString* const setDefaultOptions	= @"setDefaultOptions";
 | 
	
		
			
			| 138 | 140 |  	[_eventEmitter sendOnNavigationCommand:setStackRoot params:@{@"componentId": componentId}];
 | 
	
		
			
			| 139 | 141 |  	
 | 
	
		
			
			| 140 | 142 |  	UIViewController<RNNRootViewProtocol> *newVc = [_controllerFactory createLayoutAndSaveToStore:layout];
 | 
	
		
			
			|  | 143 | +	__weak typeof(RNNEventEmitter*) weakEventEmitter = _eventEmitter;
 | 
	
		
			
			| 141 | 144 |  	[_navigationStackManager setStackRoot:newVc fromComponent:componentId completion:^{
 | 
	
		
			
			|  | 145 | +		[weakEventEmitter sendOnNavigationCommandCompletion:setStackRoot params:@{@"componentId": componentId}];
 | 
	
		
			
			| 142 | 146 |  		completion();
 | 
	
		
			
			| 143 | 147 |  	} rejection:rejection];
 | 
	
		
			
			| 144 | 148 |  }
 | 
	
	
		
			
			|  | @@ -148,6 +152,7 @@ static NSString* const setDefaultOptions	= @"setDefaultOptions";
 | 
	
		
			
			| 148 | 152 |  	[_eventEmitter sendOnNavigationCommand:pop params:@{@"componentId": componentId}];
 | 
	
		
			
			| 149 | 153 |  	[CATransaction begin];
 | 
	
		
			
			| 150 | 154 |  	[CATransaction setCompletionBlock:^{
 | 
	
		
			
			|  | 155 | +		[_eventEmitter sendOnNavigationCommandCompletion:pop params:@{@"componentId": componentId}];
 | 
	
		
			
			| 151 | 156 |  		completion();
 | 
	
		
			
			| 152 | 157 |  	}];
 | 
	
		
			
			| 153 | 158 |  	
 | 
	
	
		
			
			|  | @@ -167,6 +172,7 @@ static NSString* const setDefaultOptions	= @"setDefaultOptions";
 | 
	
		
			
			| 167 | 172 |  	[_eventEmitter sendOnNavigationCommand:popTo params:@{@"componentId": componentId}];
 | 
	
		
			
			| 168 | 173 |  	[CATransaction begin];
 | 
	
		
			
			| 169 | 174 |  	[CATransaction setCompletionBlock:^{
 | 
	
		
			
			|  | 175 | +		[_eventEmitter sendOnNavigationCommandCompletion:popTo params:@{@"componentId": componentId}];
 | 
	
		
			
			| 170 | 176 |  		completion();
 | 
	
		
			
			| 171 | 177 |  	}];
 | 
	
		
			
			| 172 | 178 |  	
 | 
	
	
		
			
			|  | @@ -180,6 +186,7 @@ static NSString* const setDefaultOptions	= @"setDefaultOptions";
 | 
	
		
			
			| 180 | 186 |  	[_eventEmitter sendOnNavigationCommand:popToRoot params:@{@"componentId": componentId}];
 | 
	
		
			
			| 181 | 187 |  	[CATransaction begin];
 | 
	
		
			
			| 182 | 188 |  	[CATransaction setCompletionBlock:^{
 | 
	
		
			
			|  | 189 | +		[_eventEmitter sendOnNavigationCommandCompletion:popToRoot params:@{@"componentId": componentId}];
 | 
	
		
			
			| 183 | 190 |  		completion();
 | 
	
		
			
			| 184 | 191 |  	}];
 | 
	
		
			
			| 185 | 192 |  	
 | 
	
	
		
			
			|  | @@ -193,6 +200,7 @@ static NSString* const setDefaultOptions	= @"setDefaultOptions";
 | 
	
		
			
			| 193 | 200 |  	[_eventEmitter sendOnNavigationCommand:showModal params:@{@"layout": layout}];
 | 
	
		
			
			| 194 | 201 |  	UIViewController<RNNRootViewProtocol> *newVc = [_controllerFactory createLayoutAndSaveToStore:layout];
 | 
	
		
			
			| 195 | 202 |  	[_modalManager showModal:newVc completion:^{
 | 
	
		
			
			|  | 203 | +		[_eventEmitter sendOnNavigationCommandCompletion:showModal params:@{@"layout": layout}];
 | 
	
		
			
			| 196 | 204 |  		completion();
 | 
	
		
			
			| 197 | 205 |  	}];
 | 
	
		
			
			| 198 | 206 |  }
 | 
	
	
		
			
			|  | @@ -202,6 +210,7 @@ static NSString* const setDefaultOptions	= @"setDefaultOptions";
 | 
	
		
			
			| 202 | 210 |  	[_eventEmitter sendOnNavigationCommand:dismissModal params:@{@"componentId": componentId}];
 | 
	
		
			
			| 203 | 211 |  	[CATransaction begin];
 | 
	
		
			
			| 204 | 212 |  	[CATransaction setCompletionBlock:^{
 | 
	
		
			
			|  | 213 | +		[_eventEmitter sendOnNavigationCommandCompletion:dismissModal params:@{@"componentId": componentId}];
 | 
	
		
			
			| 205 | 214 |  		completion();
 | 
	
		
			
			| 206 | 215 |  	}];
 | 
	
		
			
			| 207 | 216 |  	
 | 
	
	
		
			
			|  | @@ -215,6 +224,7 @@ static NSString* const setDefaultOptions	= @"setDefaultOptions";
 | 
	
		
			
			| 215 | 224 |  	[_eventEmitter sendOnNavigationCommand:dismissAllModals params:@{}];
 | 
	
		
			
			| 216 | 225 |  	[CATransaction begin];
 | 
	
		
			
			| 217 | 226 |  	[CATransaction setCompletionBlock:^{
 | 
	
		
			
			|  | 227 | +		[_eventEmitter sendOnNavigationCommandCompletion:dismissAllModals params:@{}];
 | 
	
		
			
			| 218 | 228 |  		completion();
 | 
	
		
			
			| 219 | 229 |  	}];
 | 
	
		
			
			| 220 | 230 |  	
 | 
	
	
		
			
			|  | @@ -228,6 +238,7 @@ static NSString* const setDefaultOptions	= @"setDefaultOptions";
 | 
	
		
			
			| 228 | 238 |  	[_eventEmitter sendOnNavigationCommand:showOverlay params:@{@"layout": layout}];
 | 
	
		
			
			| 229 | 239 |  	UIViewController<RNNRootViewProtocol>* overlayVC = [_controllerFactory createOverlay:layout];
 | 
	
		
			
			| 230 | 240 |  	[_overlayManager showOverlay:overlayVC completion:^{
 | 
	
		
			
			|  | 241 | +		[_eventEmitter sendOnNavigationCommandCompletion:showOverlay params:@{@"layout": layout}];
 | 
	
		
			
			| 231 | 242 |  		completion();
 | 
	
		
			
			| 232 | 243 |  	}];
 | 
	
		
			
			| 233 | 244 |  }
 | 
	
	
		
			
			|  | @@ -236,6 +247,7 @@ static NSString* const setDefaultOptions	= @"setDefaultOptions";
 | 
	
		
			
			| 236 | 247 |  	[self assertReady];
 | 
	
		
			
			| 237 | 248 |  	[_eventEmitter sendOnNavigationCommand:dismissModal params:@{@"componentId": componentId}];
 | 
	
		
			
			| 238 | 249 |  	[_overlayManager dismissOverlay:componentId completion:^{
 | 
	
		
			
			|  | 250 | +		[_eventEmitter sendOnNavigationCommandCompletion:dismissModal params:@{@"componentId": componentId}];
 | 
	
		
			
			| 239 | 251 |  		completion();
 | 
	
		
			
			| 240 | 252 |  	}];
 | 
	
		
			
			| 241 | 253 |  }
 |