Skip to content

Commit

Permalink
Fix the bug of pressing cancel button in invitation dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
bruinfish authored and cawka committed May 9, 2014
1 parent 503917a commit e9195fd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/chatdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ void
ChatDialog::onInviteReplyVerified(ndn::Ptr<ndn::Data> data, const ndn::Name& identity, bool isIntroducer)
{
string content(data->content().buf(), data->content().size());
if(content.empty())
if(content == string("nack"))
invitationRejected(identity);
else
invitationAccepted(identity, data, content, isIntroducer);
Expand Down
2 changes: 1 addition & 1 deletion src/contactpanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ ContactPanel::acceptInvitation(const ChronosInvitation& invitation,
void
ContactPanel::rejectInvitation(const ChronosInvitation& invitation)
{
string empty;
string empty("nack");
m_handler->publishDataByIdentity (invitation.getInterestName(), empty);
}

Expand Down
3 changes: 2 additions & 1 deletion src/invitationdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,12 @@ InvitationDialog::onCancelClicked()
ui->msgLabel->clear();
ui->chatroomLine->clear();

emit invitationRejected(*m_invitation);

m_invitation = NULL;
m_identityCertificate = NULL;
m_inviterAlias.clear();

emit invitationRejected(*m_invitation);
this->close();
}

Expand Down

0 comments on commit e9195fd

Please sign in to comment.