mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-06 05:14:21 -04:00
documenting p3chatservice,
added 'idle' status to status service - idle status not saved git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2790 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
40da50799e
commit
f1dab2b094
3 changed files with 24 additions and 12 deletions
|
@ -143,20 +143,23 @@ bool p3StatusService::sendStatus(StatusInfo& statusInfo)
|
|||
if(statusInfo.id != mConnMgr->getOwnId())
|
||||
return false;
|
||||
|
||||
// If your id is not set, set it
|
||||
if(mStatusInfoMap.find(statusInfo.id) == mStatusInfoMap.end()){
|
||||
// don't save inactive status
|
||||
if(statusInfo.status != RS_STATUS_INACTIVE){
|
||||
|
||||
std::pair<std::string, StatusInfo> pr(statusInfo.id, statusInfo);
|
||||
mStatusInfoMap.insert(pr);
|
||||
IndicateConfigChanged();
|
||||
}else
|
||||
if(mStatusInfoMap[statusInfo.id].status != statusInfo.status){
|
||||
// If your id is not set, set it
|
||||
if(mStatusInfoMap.find(statusInfo.id) == mStatusInfoMap.end()){
|
||||
|
||||
IndicateConfigChanged();
|
||||
mStatusInfoMap[statusInfo.id] = statusInfo;
|
||||
std::pair<std::string, StatusInfo> pr(statusInfo.id, statusInfo);
|
||||
mStatusInfoMap.insert(pr);
|
||||
IndicateConfigChanged();
|
||||
}else
|
||||
if(mStatusInfoMap[statusInfo.id].status != statusInfo.status){
|
||||
|
||||
IndicateConfigChanged();
|
||||
mStatusInfoMap[statusInfo.id] = statusInfo;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
mConnMgr->getOnlineList(onlineList);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue