mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 22:25:04 -04:00
fixed display of peer nicknames in chat lobby
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4742 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
ed395fe061
commit
4236ad59a5
4 changed files with 25 additions and 2 deletions
|
@ -578,6 +578,16 @@ void PopupChatDialog::onPrivateChatChanged(int list, int type)
|
|||
}
|
||||
}
|
||||
|
||||
void PopupChatDialog::addIncomingChatMsg(const ChatInfo& info)
|
||||
{
|
||||
QDateTime sendTime = QDateTime::fromTime_t(info.sendTime);
|
||||
QDateTime recvTime = QDateTime::fromTime_t(info.recvTime);
|
||||
QString message = QString::fromStdWString(info.msg);
|
||||
QString name = QString::fromUtf8(rsPeers->getPeerName(info.rsid).c_str()) ;
|
||||
|
||||
addChatMsg(true, name, sendTime, recvTime, message, TYPE_NORMAL);
|
||||
}
|
||||
|
||||
void PopupChatDialog::insertChatMsgs()
|
||||
{
|
||||
std::list<ChatInfo> newchat;
|
||||
|
@ -590,14 +600,15 @@ void PopupChatDialog::insertChatMsgs()
|
|||
}
|
||||
|
||||
std::list<ChatInfo>::iterator it;
|
||||
for(it = newchat.begin(); it != newchat.end(); it++) {
|
||||
for(it = newchat.begin(); it != newchat.end(); it++)
|
||||
{
|
||||
/* are they public? */
|
||||
if ((it->chatflags & RS_CHAT_PRIVATE) == 0) {
|
||||
/* this should not happen */
|
||||
continue;
|
||||
}
|
||||
|
||||
addChatMsg(true, QString::fromUtf8(rsPeers->getPeerName(it->rsid).c_str()), QDateTime::fromTime_t(it->sendTime), QDateTime::fromTime_t(it->recvTime), QString::fromStdWString(it->msg), TYPE_NORMAL);
|
||||
addIncomingChatMsg(*it) ;
|
||||
}
|
||||
|
||||
rsMsgs->clearPrivateChatQueue(true, dialogId);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue