diff --git a/retroshare-gui/src/gui/common/FriendListModel.cpp b/retroshare-gui/src/gui/common/FriendListModel.cpp index a7cfb8f0d..8155e72ae 100644 --- a/retroshare-gui/src/gui/common/FriendListModel.cpp +++ b/retroshare-gui/src/gui/common/FriendListModel.cpp @@ -54,7 +54,7 @@ static const uint16_t UNDEFINED_PROFILE_INDEX_VALUE = (sizeof(uintptr_t)==4)?0xf const QString RsFriendListModel::FilterString("filtered"); const uint32_t MAX_INTERNAL_DATA_UPDATE_DELAY = 300 ; // re-update the internal data every 5 mins. Should properly cover sleep/wake-up changes. -const uint32_t MAX_NODE_UPDATE_DELAY = 1 ; // re-update the internal data every 5 mins. Should properly cover sleep/wake-up changes. +const uint32_t MAX_NODE_UPDATE_DELAY = 10 ; // re-update the internal data every 5 mins. Should properly cover sleep/wake-up changes. static const uint32_t NODE_DETAILS_UPDATE_DELAY = 5; // update each node every 5 secs. @@ -768,24 +768,29 @@ void RsFriendListModel::checkInternalData(bool force) { rstime_t now = time(NULL); - if(mLastInternalDataUpdate + MAX_INTERNAL_DATA_UPDATE_DELAY < now || force) + if( (mLastInternalDataUpdate + MAX_INTERNAL_DATA_UPDATE_DELAY < now) || force) updateInternalData(); - - if(mLastNodeUpdate + MAX_NODE_UPDATE_DELAY < now) - { - for(uint32_t i=0;igetPeerDetails(id,mLocations[i].node_info); - mLocations[i].last_update_ts = now; - } - - mLastNodeUpdate = now; - } +// else +// { +// preMods(); +// +// if(mLastNodeUpdate + MAX_NODE_UPDATE_DELAY < now) +// { +// for(uint32_t i=0;igetPeerDetails(id,mLocations[i].node_info); +// mLocations[i].last_update_ts = now; +// } +// +// mLastNodeUpdate = now; +// } +// postMods(); +// } } const RsFriendListModel::HierarchicalGroupInformation *RsFriendListModel::getGroupInfo(const EntryIndex& e) const diff --git a/retroshare-gui/src/gui/common/NewFriendList.cpp b/retroshare-gui/src/gui/common/NewFriendList.cpp index 43a26ba42..16f356957 100644 --- a/retroshare-gui/src/gui/common/NewFriendList.cpp +++ b/retroshare-gui/src/gui/common/NewFriendList.cpp @@ -239,11 +239,6 @@ NewFriendList::NewFriendList(QWidget */*parent*/) : /* RsAutoUpdatePage(5000,par connect(mActionSortByState, SIGNAL(toggled(bool)), this, SLOT(toggleSortByState(bool))); connect(ui->peerTreeWidget, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(peerTreeWidgetCustomPopupMenu())); - // Using Queued connections here is pretty important since the notifications may come from a different thread. - - // connect(NotifyQt::getInstance(), SIGNAL(friendsChanged()) , this, SLOT(forceUpdateDisplay()),Qt::QueuedConnection); - // connect(NotifyQt::getInstance(), SIGNAL(groupsChanged(int)) , this, SLOT(forceUpdateDisplay()),Qt::QueuedConnection); - connect(ui->actionShowOfflineFriends, SIGNAL(triggered(bool)), this, SLOT(setShowUnconnected(bool))); connect(ui->actionShowState, SIGNAL(triggered(bool)), this, SLOT(setShowState(bool)) ); connect(ui->actionShowGroups, SIGNAL(triggered(bool)), this, SLOT(setShowGroups(bool)) ); @@ -1030,11 +1025,6 @@ void NewFriendList::forceUpdateDisplay() checkInternalData(true); } -// void NewFriendList::updateDisplay() -// { -// checkInternalData(false); -// } - void NewFriendList::moveToGroup() { RsFriendListModel::RsProfileDetails pinfo;