Withings, Summary + Cache refresh update

.. when downloading withings data the cache is refreshed

.. when the cache refreshes it notifies the *current* ride
   changes if it is refreshed

.. ridesummary has been updated to process rideChanged() signals.
This commit is contained in:
Mark Liversedge
2014-12-29 22:41:08 +00:00
parent 17b4477a8c
commit 30cfaf853a
4 changed files with 13 additions and 4 deletions

View File

@@ -128,7 +128,7 @@ RideCache::itemChanged()
if (item == context->currentRideItem()) {
// in lieu of chart refresh code
//qDebug()<<"RIDE CHANGED:"<<item->fileName;
qDebug()<<"RIDE CHANGED:"<<item->fileName;
context->notifyRideChanged(item);
}
@@ -317,7 +317,13 @@ void
itemRefresh(RideItem *&item)
{
// need parser to be reentrant !item->refresh();
if (item->isstale) item->refresh();
if (item->isstale) {
item->refresh();
// and trap changes during refresh to current ride
if (item == item->context->currentRideItem())
item->context->notifyRideChanged(item);
}
}
void