mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-12 07:59:29 -05:00
Fixed display of the correct name in private Chat for offline chat messages.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3731 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
80492cfd48
commit
8852ca3c79
@ -560,6 +560,8 @@ void PopupChatDialog::onPrivateChatChanged(int list, int type, bool initial /*=
|
||||
{
|
||||
m_savedOfflineChat.clear();
|
||||
|
||||
QString name = QString::fromUtf8(rsPeers->getPeerName(rsPeers->getOwnId()).c_str());
|
||||
|
||||
std::list<ChatInfo> offlineChat;
|
||||
if (rsMsgs->getPrivateChatQueueCount(false) && rsMsgs->getPrivateChatQueue(false, dialogId, offlineChat)) {
|
||||
ui.actionClearOfflineMessages->setEnabled(true);
|
||||
@ -574,7 +576,6 @@ void PopupChatDialog::onPrivateChatChanged(int list, int type, bool initial /*=
|
||||
|
||||
m_savedOfflineChat.push_back(*it);
|
||||
|
||||
QString name = QString::fromStdString(rsPeers->getPeerName(it->rsid));
|
||||
QDateTime sendTime = QDateTime::fromTime_t(it->sendTime);
|
||||
QDateTime recvTime = QDateTime::fromTime_t(it->recvTime);
|
||||
QString message = QString::fromStdWString(it->msg);
|
||||
@ -601,10 +602,11 @@ void PopupChatDialog::onPrivateChatChanged(int list, int type, bool initial /*=
|
||||
case NOTIFY_TYPE_DEL:
|
||||
{
|
||||
if (m_manualDelete == false) {
|
||||
QString name = QString::fromUtf8(rsPeers->getPeerName(rsPeers->getOwnId()).c_str());
|
||||
|
||||
// now show saved offline chat messages as sent
|
||||
std::list<ChatInfo>::iterator it;
|
||||
for(it = m_savedOfflineChat.begin(); it != m_savedOfflineChat.end(); it++) {
|
||||
QString name = QString::fromStdString(rsPeers->getPeerName(it->rsid));
|
||||
QDateTime sendTime = QDateTime::fromTime_t(it->sendTime);
|
||||
QDateTime recvTime = QDateTime::fromTime_t(it->recvTime);
|
||||
QString message = QString::fromStdWString(it->msg);
|
||||
|
Loading…
Reference in New Issue
Block a user