mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-09-25 19:01:09 -04:00
Merge pull request #2177 from defnax/fix-invite-message
Fix to hide the Invite Button when its a Friend Request Message
This commit is contained in:
commit
e367a1f698
4 changed files with 33 additions and 22 deletions
|
@ -117,19 +117,28 @@ void MsgItem::updateItemStatic()
|
||||||
|
|
||||||
if (!mIsHome)
|
if (!mIsHome)
|
||||||
{
|
{
|
||||||
if (mi.msgflags & RS_MSG_USER_REQUEST)
|
if ((mi.msgflags & RS_MSG_USER_REQUEST) && (!mi.rsgxsid_srcId.isNull()))
|
||||||
{
|
{
|
||||||
title = QString::fromUtf8(mi.title.c_str()) + " " + tr("from") + " " + srcName;
|
title = QString::fromUtf8(mi.title.c_str()) + " " + tr("from") + " " + srcName;
|
||||||
replyButton->setText(tr("Reply to invite"));
|
replyButton->setText(tr("Reply to invite"));
|
||||||
subjectLabel->hide();
|
subjectLabel->hide();
|
||||||
inviteFrame->show();
|
inviteFrame->show();
|
||||||
}
|
}
|
||||||
else
|
else if ((mi.msgflags & RS_MSG_USER_REQUEST) && mi.rsgxsid_srcId.isNull())
|
||||||
{
|
{
|
||||||
title = tr("Message From") + ": " + srcName;
|
title = QString::fromUtf8(mi.title.c_str()) + " " + " " + srcName;
|
||||||
sendinviteButton->hide();
|
subjectLabel->hide();
|
||||||
inviteFrame->hide();
|
inviteFrame->show();
|
||||||
}
|
infoLabel->setText(tr("This message invites you to make friend! You may accept this request."));
|
||||||
|
sendinviteButton->hide();
|
||||||
|
replyButton->hide();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
title = tr("Message From") + ": " + srcName;
|
||||||
|
sendinviteButton->hide();
|
||||||
|
inviteFrame->hide();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -161,10 +161,6 @@
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Reply Message</string>
|
<string>Reply Message</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
|
||||||
<iconset>
|
|
||||||
<normaloff>:/images/mail_reply.png</normaloff>:/images/mail_reply.png</iconset>
|
|
||||||
</property>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
|
|
@ -541,11 +541,17 @@ void MessageWidget::fill(const std::string &msgId)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msgInfo.msgflags & RS_MSG_USER_REQUEST){
|
if ((msgInfo.msgflags & RS_MSG_USER_REQUEST) && msgInfo.rsgxsid_srcId.isNull()){
|
||||||
ui.inviteFrame->show();
|
ui.inviteFrame->show();
|
||||||
} else {
|
ui.sendInviteButton->hide();
|
||||||
ui.inviteFrame->hide();
|
ui.infoLabel->setText(tr("You got an invite to make friend! You may accept this request."));
|
||||||
}
|
} else if ((msgInfo.msgflags & RS_MSG_USER_REQUEST) && (!msgInfo.rsgxsid_srcId.isNull())){
|
||||||
|
ui.inviteFrame->show();
|
||||||
|
ui.sendInviteButton->show();
|
||||||
|
ui.infoLabel->setText(tr("You got an invite to make friend! You may accept this request and send your own Certificate back"));
|
||||||
|
} else {
|
||||||
|
ui.inviteFrame->hide();
|
||||||
|
}
|
||||||
|
|
||||||
const std::list<FileInfo> &recList = msgInfo.files;
|
const std::list<FileInfo> &recList = msgInfo.files;
|
||||||
std::list<FileInfo>::const_iterator it;
|
std::list<FileInfo>::const_iterator it;
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 76 KiB |
Loading…
Add table
Add a link
Reference in a new issue