Fix to hide the Invite Button when its a Friend Request Message

This commit is contained in:
defnax 2020-12-20 16:29:33 +01:00
parent 43d953b992
commit c4b6c34dbe

View File

@ -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();
}