diff options
| author | Birte Kristina Friesel <derf@finalrewind.org> | 2025-12-27 19:06:50 +0100 |
|---|---|---|
| committer | Birte Kristina Friesel <derf@finalrewind.org> | 2025-12-27 19:06:50 +0100 |
| commit | 3bdfdc74045b48937c446d96fc581931f544fc64 (patch) | |
| tree | ce57dcba910e665e864f89f6c20cb6a44dd1393e /lib/Travelynx/Command/work.pm | |
| parent | e9e06417cff8f42beb4debc9a90cb439f53e0bce (diff) | |
checkin suggestions: respect "use_history" account configuration
Diffstat (limited to 'lib/Travelynx/Command/work.pm')
| -rw-r--r-- | lib/Travelynx/Command/work.pm | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/Travelynx/Command/work.pm b/lib/Travelynx/Command/work.pm index 35c90c2..d6e70ed 100644 --- a/lib/Travelynx/Command/work.pm +++ b/lib/Travelynx/Command/work.pm @@ -53,6 +53,9 @@ sub run { my $arr = $entry->{arr_eva}; my $train_id = $entry->{train_id}; + my $use_history = $self->app->users->use_history( uid => $uid ); + my $suggestions_enabled = $use_history & 0x02; + if ( $train_id eq 'manual' ) { if ( $arr and $entry->{real_arr_ts} @@ -201,7 +204,9 @@ sub run { uid => $uid )->wait; } - elsif ( $entry->{real_arr_ts} - $now->epoch < 900 ) { + elsif ( $suggestions_enabled + and $entry->{real_arr_ts} - $now->epoch < 900 ) + { my @destinations = $self->app->journeys->get_connection_targets( uid => $uid, @@ -332,7 +337,9 @@ sub run { uid => $uid )->wait; } - elsif ( $entry->{real_arr_ts} - $now->epoch < 900 ) { + elsif ( $suggestions_enabled + and $entry->{real_arr_ts} - $now->epoch < 900 ) + { my @destinations = $self->app->journeys->get_connection_targets( uid => $uid, |
