move call to ping before call to update_*
This commit is contained in:
		
					parent
					
						
							
								4d5580ab77
							
						
					
				
			
			
				commit
				
					
						209958a584
					
				
			
		
					 1 changed files with 9 additions and 8 deletions
				
			
		
							
								
								
									
										17
									
								
								js/main.js
									
										
									
									
									
								
							
							
						
						
									
										17
									
								
								js/main.js
									
										
									
									
									
								
							|  | @ -164,6 +164,15 @@ | |||
| 	}); | ||||
| 
 | ||||
| 	function NavUpdate() { | ||||
| 		if(! stopped) { | ||||
| 			$.get("ping",function(data) { | ||||
| 				$(data).find('result').each(function() { | ||||
| 					// send nav-update event
 | ||||
| 					$('nav').trigger('nav-update', this); | ||||
| 				}); | ||||
| 			}) ; | ||||
| 		} | ||||
| 
 | ||||
| 
 | ||||
| 		if($('#live-network').length)   { src = 'network'; liveUpdate(); } | ||||
| 		if($('#live-profile').length)   { src = 'profile'; liveUpdate(); } | ||||
|  | @ -182,14 +191,6 @@ | |||
| 			} | ||||
| 		} | ||||
| 
 | ||||
| 		if(! stopped) { | ||||
| 			$.get("ping",function(data) { | ||||
| 				$(data).find('result').each(function() { | ||||
| 					// send nav-update event
 | ||||
| 					$('nav').trigger('nav-update', this); | ||||
| 				}); | ||||
| 			}) ; | ||||
| 		} | ||||
| 		timer = setTimeout(NavUpdate,30000); | ||||
| 	} | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue