Commit 0cafa174 authored by Volker Krause's avatar Volker Krause
Browse files

Only consider transfers unreachable that involve public transport

For those only using individual transport modes we can freely adjust
to delays.
parent 23a02aa2
Pipeline #96887 skipped
......@@ -186,11 +186,14 @@ bool Transfer::isReachable() const
{
if (state() == Transfer::Selected) {
if (alignment() == Transfer::After) {
const auto hasPT = std::any_of(journey().sections().begin(), journey().sections().end(), [](const auto &sec) {
return sec.mode() == KPublicTransport::JourneySection::PublicTransport;
});
if (journey().hasExpectedDepartureTime()) {
return journey().expectedDepartureTime() > anchorTime();
return !hasPT || journey().expectedDepartureTime() > anchorTime();
}
if (journey().scheduledDepartureTime().isValid()) {
return journey().scheduledDepartureTime() > anchorTime();
return !hasPT || journey().scheduledDepartureTime() > anchorTime();
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment