mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-05 21:29:23 -04:00
Count the friends (gpg id's) instead of the locations (ssl id's) in the statusbar.
Moved update of the friends from QTimer to signals. Combined p3LinkMgr::getFriendCount and p3LinkMgr::getOnlineCount and moved to p3PeerMgr. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4986 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
4867c76bb1
commit
45ac04e2e7
11 changed files with 111 additions and 89 deletions
|
@ -185,9 +185,9 @@ uint32_t p3ServerConfig::getUserLevel()
|
|||
case RSCONFIG_USER_LEVEL_NEW:
|
||||
{
|
||||
|
||||
if (mLinkMgr->getFriendCount() > MIN_BASIC_FRIENDS)
|
||||
if (mPeerMgr->getFriendCount(true, false) > MIN_BASIC_FRIENDS)
|
||||
{
|
||||
userLevel = RSCONFIG_USER_LEVEL_BASIC;
|
||||
userLevel = RSCONFIG_USER_LEVEL_BASIC;
|
||||
}
|
||||
}
|
||||
case RSCONFIG_USER_LEVEL_BASIC:
|
||||
|
@ -195,12 +195,12 @@ uint32_t p3ServerConfig::getUserLevel()
|
|||
/* check that we have some lastConnect > 0 */
|
||||
if (mPeerMgr->haveOnceConnected())
|
||||
{
|
||||
userLevel = RSCONFIG_USER_LEVEL_CASUAL;
|
||||
userLevel = RSCONFIG_USER_LEVEL_CASUAL;
|
||||
}
|
||||
}
|
||||
|
||||
case RSCONFIG_USER_LEVEL_CASUAL:
|
||||
case RSCONFIG_USER_LEVEL_POWER:
|
||||
case RSCONFIG_USER_LEVEL_POWER:
|
||||
|
||||
{
|
||||
/* check that the firewall is open */
|
||||
|
@ -214,7 +214,7 @@ uint32_t p3ServerConfig::getUserLevel()
|
|||
(RSNET_NATHOLE_NATPMP == firewallMode) ||
|
||||
(RSNET_NATHOLE_FORWARDED == firewallMode))))
|
||||
{
|
||||
userLevel = RSCONFIG_USER_LEVEL_POWER;
|
||||
userLevel = RSCONFIG_USER_LEVEL_POWER;
|
||||
}
|
||||
}
|
||||
break; /* for all */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue