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:
parent
6f7c4ebdfd
commit
70e7f34ecb
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user