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