From 2638dd36fba1fc3389138906a7436aba311dbe54 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Tue, 26 Sep 2023 20:26:12 +0200 Subject: connections: do not show cancelled trains twice --- lib/Travelynx/Controller/Traveling.pm | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib') diff --git a/lib/Travelynx/Controller/Traveling.pm b/lib/Travelynx/Controller/Traveling.pm index 35e8222..b83eea5 100755 --- a/lib/Travelynx/Controller/Traveling.pm +++ b/lib/Travelynx/Controller/Traveling.pm @@ -276,6 +276,15 @@ sub get_connecting_trains_p { eval { for my $iris_train (@iris_trains) { if ( $iris_train->[0]->departure_is_cancelled ) { + for my $hafas_train (@all_hafas_trains) { + if ( $hafas_train->number + and $hafas_train->number + == $iris_train->[0]->train_no ) + { + $hafas_train->{iris_seen} = 1; + next; + } + } next; } for my $hafas_train (@all_hafas_trains) { -- cgit v1.2.3