From d7ec56ddfd7f4579e4695c2079233b4542e34b72 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 19 Jun 2019 18:45:44 +0200 Subject: avoid train no mixup when adding missing stops to routes --- lib/DBInfoscreen/Controller/Stationboard.pm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/DBInfoscreen/Controller/Stationboard.pm b/lib/DBInfoscreen/Controller/Stationboard.pm index e0e778d..5b1b95c 100644 --- a/lib/DBInfoscreen/Controller/Stationboard.pm +++ b/lib/DBInfoscreen/Controller/Stationboard.pm @@ -936,6 +936,10 @@ sub handle_request { @iris_stations ) { + unshift( + @{ $departures[-1]{route_pre_diff} }, + @missing_pre + ); last; } push( @@ -946,10 +950,6 @@ sub handle_request { } ); } - unshift( - @{ $departures[-1]{route_pre_diff} }, - @missing_pre - ); } if ( my @iris_stations = @{ $departures[-1]{route_post_diff} } ) @@ -961,6 +961,10 @@ sub handle_request { @iris_stations ) { + push( + @{ $departures[-1]{route_post_diff} }, + @missing_post + ); last; } unshift( @@ -971,10 +975,6 @@ sub handle_request { } ); } - push( - @{ $departures[-1]{route_post_diff} }, - @missing_post - ); } } if ($route_ts) { -- cgit v1.2.3