mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-16 18:07:11 -05:00
Merge pull request #2222 from PhenomRetroShare/Fix_DistantChatAvatarStatusUpdate
Fix Distant Chat Avatar Status Update
This commit is contained in:
commit
f26d5ebc2e
@ -224,14 +224,22 @@ void AvatarWidget::refreshStatus()
|
|||||||
status = statusInfo.status ;
|
status = statusInfo.status ;
|
||||||
}
|
}
|
||||||
else if(mId.isDistantChatId())
|
else if(mId.isDistantChatId())
|
||||||
{
|
{
|
||||||
DistantChatPeerInfo dcpinfo ;
|
DistantChatPeerInfo dcpinfo ;
|
||||||
|
|
||||||
if(rsMsgs->getDistantChatStatus(mId.toDistantChatId(),dcpinfo))
|
if(rsMsgs->getDistantChatStatus(mId.toDistantChatId(),dcpinfo))
|
||||||
status = dcpinfo.status ;
|
{
|
||||||
else
|
switch (dcpinfo.status)
|
||||||
std::cerr << "(EE) cannot get distant chat status for ID=" << mId.toDistantChatId() << std::endl;
|
{
|
||||||
}
|
case RS_DISTANT_CHAT_STATUS_CAN_TALK : status = RS_STATUS_ONLINE ; break;
|
||||||
|
case RS_DISTANT_CHAT_STATUS_UNKNOWN : // Fall-through
|
||||||
|
case RS_DISTANT_CHAT_STATUS_TUNNEL_DN : // Fall-through
|
||||||
|
case RS_DISTANT_CHAT_STATUS_REMOTELY_CLOSED : status = RS_STATUS_OFFLINE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
std::cerr << "(EE) cannot get distant chat status for ID=" << mId.toDistantChatId() << std::endl;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::cerr << "Unhandled chat id type in AvatarWidget::refreshStatus()" << std::endl;
|
std::cerr << "Unhandled chat id type in AvatarWidget::refreshStatus()" << std::endl;
|
||||||
|
Loading…
Reference in New Issue
Block a user