File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -2267,6 +2267,8 @@ function refresh() {
22672267 complete : function ( request , textStatus ) {
22682268 clearTimeout ( periodical ) ;
22692269 periodical = setTimeout ( refresh , timer_seconds * 1000 ) ;
2270+
2271+ if ( periodical_predictions === null ) refreshPredictions ( ) ;
22702272 }
22712273 } ) ;
22722274}
@@ -2461,7 +2463,8 @@ function initHabitat() {
24612463}
24622464
24632465
2464- var periodical , periodical_receivers , periodical_predictions ;
2466+ var periodical , periodical_receivers ;
2467+ var periodical_predictions = null ;
24652468var timer_seconds = 15 ;
24662469
24672470function startAjax ( ) {
@@ -2475,9 +2478,6 @@ function startAjax() {
24752478
24762479 //periodical_listeners = setInterval(refreshReceivers, 60 * 1000);
24772480 refreshReceivers ( ) ;
2478-
2479- //periodical_predictions = setInterval(refreshPredictions, 2 * timer_seconds * 1000);
2480- refreshPredictions ( ) ;
24812481}
24822482
24832483function stopAjax ( ) {
@@ -2486,6 +2486,7 @@ function stopAjax() {
24862486 if ( ajax_positions ) ajax_positions . abort ( ) ;
24872487
24882488 clearTimeout ( periodical_predictions ) ;
2489+ periodical_predictions = null ;
24892490 if ( ajax_predictions ) ajax_predictions . abort ( ) ;
24902491}
24912492
You can’t perform that action at this time.
0 commit comments