mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-27 00:19:25 -05:00
fixed notification display for msgs
This commit is contained in:
parent
1d4934b71e
commit
f404962b51
@ -215,7 +215,7 @@ MessagesDialog::MessagesDialog(QWidget *parent)
|
||||
ui.messageTreeWidget->setSortingEnabled(true);
|
||||
|
||||
/* Set header sizes for the fixed columns and resize modes, must be set after processSettings */
|
||||
msgwheader->setStretchLastSection(false);
|
||||
msgwheader->setStretchLastSection(true);
|
||||
|
||||
|
||||
// fill folder list
|
||||
|
@ -144,7 +144,13 @@ public:
|
||||
float f = fm.height();
|
||||
|
||||
QIcon icon ;
|
||||
if(! computeNameIconAndComment(id,str,icon,comment))
|
||||
|
||||
if(id.isNull())
|
||||
{
|
||||
str = tr("[Notification]");
|
||||
icon = QIcon(":/icons/logo_128.png");
|
||||
}
|
||||
else if(! computeNameIconAndComment(id,str,icon,comment))
|
||||
if(mReloadPeriod > 3)
|
||||
{
|
||||
str = tr("[Unknown]");
|
||||
@ -193,7 +199,10 @@ public:
|
||||
QList<QIcon> icons;
|
||||
|
||||
if(rsPeers->isFriend(RsPeerId(id))) // horrible trick because some widgets still use locations as IDs (e.g. messages)
|
||||
{
|
||||
name = QString::fromUtf8(rsPeers->getPeerName(RsPeerId(id)).c_str()) ;
|
||||
icon = QIcon(":/icons/avatar_128.png");
|
||||
}
|
||||
else if(!GxsIdDetails::MakeIdDesc(id, true, name, icons, comment,GxsIdDetails::ICON_TYPE_AVATAR))
|
||||
return false;
|
||||
else
|
||||
|
@ -600,8 +600,8 @@ void MessageWidget::fill(const std::string &msgId)
|
||||
link = RetroShareLink::createMessage(msgInfo.rspeerid_srcId, "");
|
||||
}
|
||||
|
||||
if ((msgInfo.msgflags & RS_MSG_SYSTEM) && msgInfo.rspeerid_srcId == ownId) {
|
||||
ui.fromText->setText("RetroShare");
|
||||
if (((msgInfo.msgflags & RS_MSG_SYSTEM) && msgInfo.rspeerid_srcId == ownId) || msgInfo.rspeerid_srcId.isNull()) {
|
||||
ui.fromText->setText("[Notification]");
|
||||
if (toolButtonReply) toolButtonReply->setEnabled(false);
|
||||
} else {
|
||||
ui.fromText->setText(link.toHtml());
|
||||
|
Loading…
Reference in New Issue
Block a user