From b0529c9c9b88a25942b4661f370cb78669d301b3 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 3 Jun 2019 15:11:27 +0200 Subject: Fix order of HIM messages --- lib/DBInfoscreen/Controller/Stationboard.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/DBInfoscreen/Controller/Stationboard.pm b/lib/DBInfoscreen/Controller/Stationboard.pm index 5db9bbd..7657a85 100644 --- a/lib/DBInfoscreen/Controller/Stationboard.pm +++ b/lib/DBInfoscreen/Controller/Stationboard.pm @@ -959,15 +959,15 @@ sub handle_request { } } if ( $him and @{$him} ) { + my @him_messages; $departures[-1]{messages}{him} = $him; for my $message ( @{$him} ) { if ( $message->{display} ) { - unshift( - @{ $departures[-1]{moreinfo} }, - [ $message->{header}, $message->{lead} ] - ); + push( @him_messages, + [ $message->{header}, $message->{lead} ] ); } } + unshift( @{ $departures[-1]{moreinfo} }, @him_messages ); } } } -- cgit v1.2.3