mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-15 17:37:12 -05: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
@ -117,13 +117,22 @@ void MsgItem::updateItemStatic()
|
||||
|
||||
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;
|
||||
replyButton->setText(tr("Reply to invite"));
|
||||
subjectLabel->hide();
|
||||
inviteFrame->show();
|
||||
}
|
||||
else if ((mi.msgflags & RS_MSG_USER_REQUEST) && mi.rsgxsid_srcId.isNull())
|
||||
{
|
||||
title = QString::fromUtf8(mi.title.c_str()) + " " + " " + srcName;
|
||||
subjectLabel->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;
|
||||
|
@ -161,10 +161,6 @@
|
||||
<property name="text">
|
||||
<string>Reply Message</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>:/images/mail_reply.png</normaloff>:/images/mail_reply.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -541,8 +541,14 @@ void MessageWidget::fill(const std::string &msgId)
|
||||
return;
|
||||
}
|
||||
|
||||
if (msgInfo.msgflags & RS_MSG_USER_REQUEST){
|
||||
if ((msgInfo.msgflags & RS_MSG_USER_REQUEST) && msgInfo.rsgxsid_srcId.isNull()){
|
||||
ui.inviteFrame->show();
|
||||
ui.sendInviteButton->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();
|
||||
}
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 76 KiB |
Loading…
Reference in New Issue
Block a user