forked from EVOgeek/Vmeda.Online
		
	MOBILE-3320 core: Fix cancel reconnect when app is resumed
This commit is contained in:
		
							parent
							
								
									34b2a1f565
								
							
						
					
					
						commit
						aebedbd150
					
				| @ -132,16 +132,21 @@ export class AppComponent implements OnInit, AfterViewInit { | |||||||
| 
 | 
 | ||||||
|         // Check InAppBrowser closed.
 |         // Check InAppBrowser closed.
 | ||||||
|         CoreEvents.on(CoreEvents.IAB_EXIT, () => { |         CoreEvents.on(CoreEvents.IAB_EXIT, () => { | ||||||
|             CoreLoginHelper.setWaitingForBrowser(false); |  | ||||||
|             this.lastInAppUrl = ''; |             this.lastInAppUrl = ''; | ||||||
|  | 
 | ||||||
|  |             if (CoreLoginHelper.isWaitingForBrowser()) { | ||||||
|  |                 CoreLoginHelper.setWaitingForBrowser(false); | ||||||
|                 CoreLoginHelper.checkLogout(); |                 CoreLoginHelper.checkLogout(); | ||||||
|  |             } | ||||||
|         }); |         }); | ||||||
| 
 | 
 | ||||||
|         Platform.resume.subscribe(() => { |         Platform.resume.subscribe(() => { | ||||||
|             // Wait a second before setting it to false since in iOS there could be some frozen WS calls.
 |             // Wait a second before setting it to false since in iOS there could be some frozen WS calls.
 | ||||||
|             setTimeout(() => { |             setTimeout(() => { | ||||||
|  |                 if (CoreLoginHelper.isWaitingForBrowser()) { | ||||||
|                     CoreLoginHelper.setWaitingForBrowser(false); |                     CoreLoginHelper.setWaitingForBrowser(false); | ||||||
|                     CoreLoginHelper.checkLogout(); |                     CoreLoginHelper.checkLogout(); | ||||||
|  |                 } | ||||||
|             }, 1000); |             }, 1000); | ||||||
|         }); |         }); | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user