mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Set own status initially to online.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4592 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
a34c482db1
commit
1821d8cb06
@ -70,7 +70,16 @@ bool p3StatusService::getOwnStatus(StatusInfo& statusInfo)
|
|||||||
|
|
||||||
if (it == mStatusInfoMap.end()){
|
if (it == mStatusInfoMap.end()){
|
||||||
std::cerr << "p3StatusService::saveList() :" << "Did not find your status" << ownId << std::endl;
|
std::cerr << "p3StatusService::saveList() :" << "Did not find your status" << ownId << std::endl;
|
||||||
return false;
|
|
||||||
|
// own status not set, set it to online
|
||||||
|
statusInfo.id = ownId;
|
||||||
|
statusInfo.status = RS_STATUS_ONLINE;
|
||||||
|
|
||||||
|
std::pair<std::string, StatusInfo> pr(ownId, statusInfo);
|
||||||
|
mStatusInfoMap.insert(pr);
|
||||||
|
IndicateConfigChanged();
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
statusInfo = it->second;
|
statusInfo = it->second;
|
||||||
|
@ -150,10 +150,10 @@ void AvatarWidget::refreshStatus()
|
|||||||
{
|
{
|
||||||
StatusInfo statusInfo;
|
StatusInfo statusInfo;
|
||||||
|
|
||||||
// No check of return value. Non existing status info is handled as offline.
|
|
||||||
if (mFlag.isOwnId) {
|
if (mFlag.isOwnId) {
|
||||||
rsStatus->getOwnStatus(statusInfo);
|
rsStatus->getOwnStatus(statusInfo);
|
||||||
} else {
|
} else {
|
||||||
|
// No check of return value. Non existing status info is handled as offline.
|
||||||
rsStatus->getStatus(mId, statusInfo);
|
rsStatus->getStatus(mId, statusInfo);
|
||||||
}
|
}
|
||||||
updateStatus(QString::fromStdString(statusInfo.id), statusInfo.status);
|
updateStatus(QString::fromStdString(statusInfo.id), statusInfo.status);
|
||||||
|
Loading…
Reference in New Issue
Block a user