mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Fix From text in Mail
Missing lines in Change RetroShareLink creation methodes as static
This commit is contained in:
parent
03d675157f
commit
6b2bc7d84b
@ -316,16 +316,15 @@ void RetroShareLink::fromUrl(const QUrl& url)
|
||||
RsGxsId id(gxsid.toStdString()) ;
|
||||
|
||||
if(!id.isNull())
|
||||
createIdentity(id,name,radix) ;
|
||||
*this = createIdentity(id,name,radix) ;
|
||||
else
|
||||
std::cerr << "(EE) identity link is not valid." << std::endl;
|
||||
return ;
|
||||
}
|
||||
|
||||
if (url.host() == HOST_MESSAGE) {
|
||||
_type = TYPE_MESSAGE;
|
||||
std::string id = urlQuery.queryItemValue(MESSAGE_ID).toStdString();
|
||||
createMessage(RsPeerId(id), urlQuery.queryItemValue(MESSAGE_SUBJECT));
|
||||
*this = createMessage(RsPeerId(id), urlQuery.queryItemValue(MESSAGE_SUBJECT));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -579,7 +579,7 @@ void MessageWidget::fill(const std::string &msgId)
|
||||
ui.dateText->setText(DateTime::formatDateTime(msgInfo.ts));
|
||||
|
||||
RsPeerId ownId = rsPeers->getOwnId();
|
||||
QString tooltip_string ;
|
||||
QString tooltip_string ;
|
||||
|
||||
// if ((msgInfo.msgflags & RS_MSG_BOXMASK) == RS_MSG_OUTBOX) // outgoing message are from me
|
||||
// {
|
||||
@ -587,27 +587,27 @@ void MessageWidget::fill(const std::string &msgId)
|
||||
// link.createMessage(ownId, "");
|
||||
// }
|
||||
|
||||
if(msgInfo.msgflags & RS_MSG_DISTANT) // distant message
|
||||
{
|
||||
tooltip_string = PeerDefs::rsidFromId(msgInfo.rsgxsid_srcId) ;
|
||||
link.createMessage(msgInfo.rsgxsid_srcId, "");
|
||||
}
|
||||
else
|
||||
{
|
||||
tooltip_string = PeerDefs::rsidFromId(msgInfo.rspeerid_srcId) ;
|
||||
link.createMessage(msgInfo.rspeerid_srcId, "");
|
||||
}
|
||||
if(msgInfo.msgflags & RS_MSG_DISTANT) // distant message
|
||||
{
|
||||
tooltip_string = PeerDefs::rsidFromId(msgInfo.rsgxsid_srcId) ;
|
||||
link = RetroShareLink::createMessage(msgInfo.rsgxsid_srcId, "");
|
||||
}
|
||||
else
|
||||
{
|
||||
tooltip_string = PeerDefs::rsidFromId(msgInfo.rspeerid_srcId) ;
|
||||
link = RetroShareLink::createMessage(msgInfo.rspeerid_srcId, "");
|
||||
}
|
||||
|
||||
if ((msgInfo.msgflags & RS_MSG_SYSTEM) && msgInfo.rspeerid_srcId == ownId) {
|
||||
if ((msgInfo.msgflags & RS_MSG_SYSTEM) && msgInfo.rspeerid_srcId == ownId) {
|
||||
ui.fromText->setText("RetroShare");
|
||||
} else {
|
||||
ui.fromText->setText(link.toHtml());
|
||||
ui.fromText->setToolTip(tooltip_string) ;
|
||||
}
|
||||
|
||||
ui.subjectText->setText(QString::fromUtf8(msgInfo.title.c_str()));
|
||||
ui.subjectText->setText(QString::fromUtf8(msgInfo.title.c_str()));
|
||||
|
||||
// emoticons disabled because of crazy cost.
|
||||
// emoticons disabled because of crazy cost.
|
||||
//text = RsHtmlMsg(msgInfo.msgflags).formatText(ui.msgText->document(), QString::fromUtf8(msgInfo.msg.c_str()), RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS);
|
||||
text = RsHtmlMsg(msgInfo.msgflags).formatText(ui.msgText->document(), QString::fromUtf8(msgInfo.msg.c_str()), RSHTML_FORMATTEXT_EMBED_LINKS);
|
||||
ui.msgText->resetImagesStatus(Settings->getMsgLoadEmbeddedImages() || (msgInfo.msgflags & RS_MSG_LOAD_EMBEDDED_IMAGES));
|
||||
|
Loading…
Reference in New Issue
Block a user