mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-22 22:21:09 -04:00
removed member gxs_id from ChatId class, because ChatId now uses tunnel ids stored in distant_chat_id for distant chat.
reverted naming confusion in in libresapi ChatHandler and fixed author of distant chat messages (distant chat is still unfinished)
This commit is contained in:
parent
0ac76d621e
commit
7cd880e1e4
9 changed files with 43 additions and 55 deletions
|
@ -124,19 +124,33 @@ void AvatarWidget::setFrameType(FrameType type)
|
|||
void AvatarWidget::setId(const ChatId &id)
|
||||
{
|
||||
mId = id;
|
||||
mGxsId.clear();
|
||||
|
||||
setPixmap(QPixmap());
|
||||
|
||||
if (id.isNotSet()) {
|
||||
setEnabled(false);
|
||||
}
|
||||
|
||||
if(mId.isGxsId())
|
||||
std::cerr << "(EE) AvatarWidget should not be set to a GXS id." << std::endl;
|
||||
|
||||
refreshAvatarImage();
|
||||
refreshStatus();
|
||||
}
|
||||
|
||||
void AvatarWidget::setGxsId(const RsGxsId &id)
|
||||
{
|
||||
mId = ChatId();
|
||||
mGxsId = id;
|
||||
|
||||
setPixmap(QPixmap());
|
||||
|
||||
if (id.isNull()) {
|
||||
setEnabled(false);
|
||||
}
|
||||
|
||||
refreshAvatarImage();
|
||||
refreshStatus();
|
||||
}
|
||||
|
||||
void AvatarWidget::setOwnId()
|
||||
{
|
||||
mFlag.isOwnId = true;
|
||||
|
@ -242,6 +256,14 @@ void AvatarWidget::updateAvatar(const QString &peerId)
|
|||
}
|
||||
void AvatarWidget::refreshAvatarImage()
|
||||
{
|
||||
if (mGxsId.isNull()==false)
|
||||
{
|
||||
QPixmap avatar;
|
||||
|
||||
AvatarDefs::getAvatarFromGxsId(mGxsId, avatar, defaultAvatar);
|
||||
setPixmap(avatar);
|
||||
return;
|
||||
}
|
||||
if (mId.isNotSet())
|
||||
{
|
||||
QPixmap avatar(defaultAvatar);
|
||||
|
@ -262,14 +284,6 @@ void AvatarWidget::refreshAvatarImage()
|
|||
setPixmap(avatar);
|
||||
return;
|
||||
}
|
||||
// else if (mId.isGxsId())
|
||||
// {
|
||||
// QPixmap avatar;
|
||||
//
|
||||
// AvatarDefs::getAvatarFromGxsId(mId.toGxsId(), avatar, defaultAvatar);
|
||||
// setPixmap(avatar);
|
||||
// return;
|
||||
// }
|
||||
else if (mId.isDistantChatId())
|
||||
{
|
||||
QPixmap avatar;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue