From f628d6650346bcd67f684a70dd72d6081c578c29 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Wed, 25 Jun 2025 17:40:26 +0200 Subject: IRIS: Fix sorting of cancelled arrival-only/departure-only entries --- lib/DBInfoscreen/Controller/Stationboard.pm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'lib/DBInfoscreen/Controller') diff --git a/lib/DBInfoscreen/Controller/Stationboard.pm b/lib/DBInfoscreen/Controller/Stationboard.pm index a169e27..3e07f90 100644 --- a/lib/DBInfoscreen/Controller/Stationboard.pm +++ b/lib/DBInfoscreen/Controller/Stationboard.pm @@ -2284,8 +2284,10 @@ sub render_board_hafas { sort { $a->[0] <=> $b->[0] } map { [ - $_->arrival_is_cancelled - ? ( $_->sched_arrival // $_->sched_departure ) + ( + $_->sched_arrival ? $_->arrival_is_cancelled + : $_->is_cancelled + ) ? ( $_->sched_arrival // $_->sched_departure ) : ( $_->arrival // $_->departure ), $_ ] @@ -2296,8 +2298,10 @@ sub render_board_hafas { sort { $a->[0] <=> $b->[0] } map { [ - $_->departure_is_cancelled - ? ( $_->sched_departure // $_->sched_arrival ) + ( + $_->sched_departure ? $_->departure_is_cancelled + : $_->is_cancelled + ) ? ( $_->sched_departure // $_->sched_arrival ) : ( $_->departure // $_->arrival ), $_ ] -- cgit v1.2.3