mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-23 05:44:45 -04:00
simplified the remoteDirModel cache system a little bie
This commit is contained in:
parent
644c41e2e7
commit
61131e4bf5
2 changed files with 5 additions and 7 deletions
|
@ -56,7 +56,7 @@ RetroshareDirModel::RetroshareDirModel(bool mode, QObject *parent)
|
|||
#endif
|
||||
treeStyle();
|
||||
|
||||
mLastPointer = (void*)intptr_t(0xffffffff) ;
|
||||
mDirDetails.ref = (void*)intptr_t(0xffffffff) ;
|
||||
mLastRemote = false ;
|
||||
}
|
||||
|
||||
|
@ -972,9 +972,9 @@ bool RetroshareDirModel::requestDirDetails(void *ref, bool remote,DirDetails& d)
|
|||
|
||||
time_t now = time(NULL);
|
||||
|
||||
if(mLastPointer == ref && mLastRemote==remote && now < 2+mLastReq)
|
||||
if(mDirDetails.ref == ref && mLastRemote==remote && now < 2+mLastReq)
|
||||
{
|
||||
d = mLastDirDetails ;
|
||||
d = mDirDetails ;
|
||||
return true ;
|
||||
}
|
||||
|
||||
|
@ -983,9 +983,8 @@ bool RetroshareDirModel::requestDirDetails(void *ref, bool remote,DirDetails& d)
|
|||
if(rsFiles->RequestDirDetails(ref, d, flags))
|
||||
{
|
||||
mLastReq = now ;
|
||||
mLastPointer = ref ;
|
||||
mLastRemote = remote ;
|
||||
mLastDirDetails = d;
|
||||
mDirDetails = d;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue