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

Update transfer anchor times on arrival delays

This helps for manually selecting transfers at the right time already,
for automatically selected transfers we still need to actually search
for a new option here.
parent fd31f089
......@@ -72,6 +72,19 @@ void TransferManager::setFavoriteLocationModel(FavoriteLocationModel *favLocMode
void TransferManager::setLiveDataManager(LiveDataManager *liveDataMgr)
{
m_liveDataMgr = liveDataMgr;
connect(m_liveDataMgr, &LiveDataManager::arrivalUpdated,this, [this](const QString &resId) {
// update anchor time if we have a transfer for this
auto t = transfer(resId, Transfer::After);
if (t.state() == Transfer::Discarded || t.state() == Transfer::UndefinedState) {
return;
}
t.setAnchorTime(anchorTimeAfter(resId, m_resMgr->reservation(resId)));
addOrUpdateTransfer(t);
// TODO if there's existing transfer, check if we miss this now
// if so: warn and search for a new one if auto transfers are enabled
});
}
void TransferManager::setAutoAddTransfers(bool enable)
......
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