added auto-resend of unsent messages. Fixed display of From field in outbox

This commit is contained in:
csoler 2016-01-08 20:48:47 -05:00
parent 0c591f08ae
commit 75edb46c99
2 changed files with 108 additions and 77 deletions

View file

@ -1098,25 +1098,34 @@ void MessagesDialog::insertMessages()
// From ....
{
bool setText = true;
if (msgbox == RS_MSG_INBOX || msgbox == RS_MSG_OUTBOX) {
if (msgbox == RS_MSG_INBOX || msgbox == RS_MSG_OUTBOX)
{
if ((it->msgflags & RS_MSG_SYSTEM) && it->srcId == ownId) {
text = "RetroShare";
} else {
}
else
{
if (it->msgflags & RS_MSG_DISTANT)
{
// distant message
setText = false;
if (gotInfo || rsMail->getMessage(it->msgId, msgInfo)) {
gotInfo = true;
item->setId(RsGxsId(msgInfo.rsgxsid_srcId), COLUMN_FROM, false);
} else {
if(msgbox != RS_MSG_INBOX && !msgInfo.rsgxsid_msgto.empty())
item->setId(RsGxsId(*msgInfo.rsgxsid_msgto.begin()), COLUMN_FROM, false);
else
item->setId(RsGxsId(msgInfo.rsgxsid_srcId), COLUMN_FROM, false);
}
else
std::cerr << "MessagesDialog::insertMsgTxtAndFiles() Couldn't find Msg" << std::endl;
}
} else {
}
else
text = QString::fromUtf8(rsPeers->getPeerName(it->srcId).c_str());
}
}
} else {
}
else
{
if (gotInfo || rsMail->getMessage(it->msgId, msgInfo)) {
gotInfo = true;