mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-12 15:25:34 +08:00
Fixed issue with still using header instead of info object data
plus some utility functionality
This commit is contained in:
committed by
Mathew Sutcliffe
parent
b444361c7c
commit
8ad7c1e3c7
@@ -44,7 +44,7 @@ namespace BlackCore
|
||||
if (dir.isEmpty() || whatToRead == CEntityFlags::NoEntity) { return false; }
|
||||
QTimer::singleShot(0, this, [this, dir, whatToRead]()
|
||||
{
|
||||
CStatusMessageList msgs = this->readFromJsonFiles(dir, whatToRead);
|
||||
const CStatusMessageList msgs = this->readFromJsonFiles(dir, whatToRead);
|
||||
if (msgs.isFailure())
|
||||
{
|
||||
CLogMessage::preformatted(msgs);
|
||||
|
||||
@@ -140,7 +140,7 @@ namespace BlackCore
|
||||
if (entities == CEntityFlags::NoEntity) { return CEntityFlags::NoEntity; }
|
||||
if (checkCacheTsUpfront)
|
||||
{
|
||||
CEntityFlags::Entity newerHeaderEntities = this->getEntitesWithNewerHeaderTimestamp(entities);
|
||||
CEntityFlags::Entity newerHeaderEntities = this->getEntitesWithNewerSharedInfoObject(entities);
|
||||
if (newerHeaderEntities != entities)
|
||||
{
|
||||
const CEntityFlags::Entity validInCacheEntities = (entities ^ newerHeaderEntities) & entities;
|
||||
@@ -389,7 +389,7 @@ namespace BlackCore
|
||||
const QDateTime cacheTs(this->getCacheTimestamp(entity));
|
||||
if (!cacheTs.isValid()) { return true; } // we have no cache ts
|
||||
|
||||
const QDateTime sharedInfoTimestamp(this->getLatestSharedFileHeaderTimestamp(entity));
|
||||
const QDateTime sharedInfoTimestamp(this->getLatestEntityTimestampFromSharedInfoObjects(entity));
|
||||
if (!sharedInfoTimestamp.isValid()) { return false; }
|
||||
return sharedInfoTimestamp > cacheTs;
|
||||
}
|
||||
|
||||
@@ -320,7 +320,7 @@ namespace BlackCore
|
||||
CEntityFlags::Entity CWebDataServices::triggerLoadingDirectlyFromSharedFiles(CEntityFlags::Entity whatToRead, bool checkCacheTsUpfront)
|
||||
{
|
||||
CEntityFlags::Entity triggeredRead = CEntityFlags::NoEntity;
|
||||
this->triggerReadOfSharedInfoObjects(); // trigger reload of headers
|
||||
this->triggerReadOfSharedInfoObjects(); // trigger reload of info objects (for shared)
|
||||
|
||||
if (m_icaoDataReader)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user