From 92b0c8e4b7be8c26873fe5cbe3b1d67703c2e7c5 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 15 Aug 2021 19:11:02 +0200 Subject: fix hidelowdelay when combined with show_realtime --- lib/DBInfoscreen/Controller/Stationboard.pm | 3 --- templates/app.html.ep | 8 ++++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/DBInfoscreen/Controller/Stationboard.pm b/lib/DBInfoscreen/Controller/Stationboard.pm index a52a3ce..18fa100 100644 --- a/lib/DBInfoscreen/Controller/Stationboard.pm +++ b/lib/DBInfoscreen/Controller/Stationboard.pm @@ -1120,9 +1120,6 @@ sub handle_result { if ($info) { $info =~ s{ (?: ca [.] \s* )? [+] [ 1 2 3 4 ] $ }{}x; } - if ( $delay and $delay < 5 ) { - $delay = undef; - } } if ($info) { $info =~ s{ (?: ca [.] \s* )? [+] (\d+) }{Verspätung ca $1 Min.}x; diff --git a/templates/app.html.ep b/templates/app.html.ep index 852d8a8..6baf0f4 100644 --- a/templates/app.html.ep +++ b/templates/app.html.ep @@ -99,18 +99,18 @@ $departure->{is_cancelled}) ? 'delayed' : q{} %>"> % if ($departure->{delay} and not $departure->{is_cancelled}) { % if ($show_realtime) { -% if ($departure->{delay} > 0) { +% if ($departure->{delay} > ($hide_low_delay ? 4 : 0)) { % } -% else { +% elsif ($departure->{delay} < 0) { % } % } % else { -% if ($departure->{delay} > 0) { +% if ($departure->{delay} > ($hide_low_delay ? 4 : 0)) { % } -% else { +% elsif ($departure->{delay} < 0) { % } % } -- cgit v1.2.3