Commit bbc377e5 authored by Volker Krause's avatar Volker Krause
Browse files

Expand live data monitoring to bus reservations

parent f29006cc
...@@ -367,7 +367,7 @@ void LiveDataManager::cancelNotification(const QString &resId) ...@@ -367,7 +367,7 @@ void LiveDataManager::cancelNotification(const QString &resId)
QDateTime LiveDataManager::departureTime(const QString &resId, const QVariant &res) const QDateTime LiveDataManager::departureTime(const QString &resId, const QVariant &res) const
{ {
if (JsonLd::isA<TrainReservation>(res)) { if (JsonLd::isA<TrainReservation>(res) || JsonLd::isA<BusReservation>(res)) {
const auto &dep = departure(resId); const auto &dep = departure(resId);
if (dep.hasExpectedDepartureTime()) { if (dep.hasExpectedDepartureTime()) {
return dep.expectedDepartureTime(); return dep.expectedDepartureTime();
...@@ -379,7 +379,7 @@ QDateTime LiveDataManager::departureTime(const QString &resId, const QVariant &r ...@@ -379,7 +379,7 @@ QDateTime LiveDataManager::departureTime(const QString &resId, const QVariant &r
QDateTime LiveDataManager::arrivalTime(const QString &resId, const QVariant &res) const QDateTime LiveDataManager::arrivalTime(const QString &resId, const QVariant &res) const
{ {
if (JsonLd::isA<TrainReservation>(res)) { if (JsonLd::isA<TrainReservation>(res) || JsonLd::isA<BusReservation>(res)) {
const auto &arr = arrival(resId); const auto &arr = arrival(resId);
if (arr.hasExpectedArrivalTime()) { if (arr.hasExpectedArrivalTime()) {
return arr.expectedArrivalTime(); return arr.expectedArrivalTime();
...@@ -533,7 +533,7 @@ void LiveDataManager::pollForUpdates(bool force) ...@@ -533,7 +533,7 @@ void LiveDataManager::pollForUpdates(bool force)
continue; continue;
} }
if (JsonLd::isA<TrainReservation>(res)) { if (JsonLd::isA<TrainReservation>(res) || JsonLd::isA<BusReservation>(res)) {
checkReservation(res, batchId); checkReservation(res, batchId);
} }
......
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