summaryrefslogtreecommitdiff
path: root/lib/Travelynx/Controller/Traveling.pm
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2023-07-15 19:20:37 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2023-07-15 19:20:37 +0200
commit1cca278baac0f50012e524eac7c441c998f4d8c3 (patch)
treeae292c5aef5c86e92d255e97010507c67daa02c6 /lib/Travelynx/Controller/Traveling.pm
parentbee67f096a5732fed5cb9c3e716012b536950022 (diff)
add timeline / current checkins
Diffstat (limited to 'lib/Travelynx/Controller/Traveling.pm')
-rwxr-xr-xlib/Travelynx/Controller/Traveling.pm14
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/Travelynx/Controller/Traveling.pm b/lib/Travelynx/Controller/Traveling.pm
index f283762..fe9b4f5 100755
--- a/lib/Travelynx/Controller/Traveling.pm
+++ b/lib/Travelynx/Controller/Traveling.pm
@@ -382,7 +382,13 @@ sub compute_effective_visibility {
sub homepage {
my ($self) = @_;
if ( $self->is_user_authenticated ) {
- my $status = $self->get_user_status;
+ my $uid = $self->current_user->{id};
+ my $status = $self->get_user_status;
+ my @timeline = $self->in_transit->get_timeline(
+ uid => $uid,
+ short => 1
+ );
+ $self->stash( timeline => [@timeline] );
my @recent_targets;
if ( $status->{checked_in} ) {
my $journey_visibility
@@ -457,6 +463,12 @@ sub status_card {
delete $self->stash->{layout};
+ my @timeline = $self->in_transit->get_timeline(
+ uid => $self->current_user->{id},
+ short => 1
+ );
+ $self->stash( timeline => [@timeline] );
+
if ( $status->{checked_in} ) {
my $journey_visibility
= $self->compute_effective_visibility(