summaryrefslogtreecommitdiff
path: root/lib/Travelynx/Controller
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Travelynx/Controller')
-rwxr-xr-xlib/Travelynx/Controller/Traveling.pm11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/Travelynx/Controller/Traveling.pm b/lib/Travelynx/Controller/Traveling.pm
index 991526e..eb8a657 100755
--- a/lib/Travelynx/Controller/Traveling.pm
+++ b/lib/Travelynx/Controller/Traveling.pm
@@ -362,7 +362,16 @@ sub status_card {
);
}
else {
- $self->render( '_checked_out', journey => $status );
+ my @connecting_trains;
+ my $now = DateTime->now( time_zone => 'Europe/Berlin' );
+ if ( $now->epoch - $status->{timestamp}->epoch < ( 30 * 60 ) ) {
+ @connecting_trains = $self->get_connecting_trains;
+ }
+ $self->render(
+ '_checked_out',
+ journey => $status,
+ connections => \@connecting_trains
+ );
}
}