1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Don't ask to remove history for fake friend removal

This commit is contained in:
tux3 2015-05-11 22:48:32 +02:00
parent 6f7c4ebdfd
commit 70e7f34ecb
No known key found for this signature in database
GPG Key ID: 7E086DD661263264

View File

@ -867,16 +867,19 @@ void Widget::onFriendRequestReceived(const QString& userId, const QString& messa
}
void Widget::removeFriend(Friend* f, bool fake)
{
QMessageBox::StandardButton removeFriendMB;
removeFriendMB = QMessageBox::question(0,
tr("Remove history"),
tr("Do you want to remove history as well?"),
QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel);
if (removeFriendMB == QMessageBox::Cancel)
return;
else if (removeFriendMB == QMessageBox::Yes)
HistoryKeeper::getInstance()->removeFriendHistory(f->getToxID().publicKey);
{
if (!fake)
{
QMessageBox::StandardButton removeFriendMB;
removeFriendMB = QMessageBox::question(0,
tr("Remove history"),
tr("Do you want to remove history as well?"),
QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel);
if (removeFriendMB == QMessageBox::Cancel)
return;
else if (removeFriendMB == QMessageBox::Yes)
HistoryKeeper::getInstance()->removeFriendHistory(f->getToxID().publicKey);
}
f->getFriendWidget()->setAsInactiveChatroom();
if (static_cast<GenericChatroomWidget*>(f->getFriendWidget()) == activeChatroomWidget)