summaryrefslogtreecommitdiff
path: root/lib/DBInfoscreen
diff options
context:
space:
mode:
authorBirte Kristina Friesel <birte.friesel@uos.de>2024-04-12 17:51:30 +0200
committerBirte Kristina Friesel <birte.friesel@uos.de>2024-04-12 17:51:30 +0200
commita62ab624d4a5031e82777bdb3b45e99fd177d7b1 (patch)
tree9108964c0abfcf56260c84ec49db003fc4b70fb3 /lib/DBInfoscreen
parent3e922f517cbebc1aa8ab60081a9977e8a684866b (diff)
train detail title: show line if number is unavailable
Diffstat (limited to 'lib/DBInfoscreen')
-rw-r--r--lib/DBInfoscreen/Controller/Stationboard.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/DBInfoscreen/Controller/Stationboard.pm b/lib/DBInfoscreen/Controller/Stationboard.pm
index f1f51da..e9b95b8 100644
--- a/lib/DBInfoscreen/Controller/Stationboard.pm
+++ b/lib/DBInfoscreen/Controller/Stationboard.pm
@@ -1180,7 +1180,8 @@ sub train_details {
my $train_type = $res->{train_type} = $journey->type // q{};
my $train_no = $res->{train_no} = $journey->number // q{};
$res->{train_line} = $journey->line_no // q{};
- $self->stash( title => "${train_type} ${train_no}" );
+ $self->stash( title => $train_type . ' '
+ . ( $train_no || $res->{train_line} ) );
}
if ( not defined $journey->class ) {