Commit dfcba74c authored by Volker Krause's avatar Volker Krause

Fix arrival/departure time computation for live train data

parent 70f493b9
......@@ -306,7 +306,7 @@ void LiveDataManager::updateDepartureData(const KPublicTransport::Departure &dep
QDateTime LiveDataManager::departureTime(const QString &resId, const QVariant &res) const
{
if (JsonLd::isA<TrainTrip>(res)) {
if (JsonLd::isA<TrainReservation>(res)) {
const auto &dep = m_departures.value(resId).change;
if (dep.hasExpectedDepartureTime()) {
return dep.expectedDepartureTime();
......@@ -318,7 +318,7 @@ QDateTime LiveDataManager::departureTime(const QString &resId, const QVariant &r
QDateTime LiveDataManager::arrivalTime(const QString &resId, const QVariant &res) const
{
if (JsonLd::isA<TrainTrip>(res)) {
if (JsonLd::isA<TrainReservation>(res)) {
const auto &arr = m_arrivals.value(resId).change;
if (arr.hasExpectedArrivalTime()) {
return arr.expectedArrivalTime();
......
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