mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
parent
22732b6f79
commit
359a42f78e
|
@ -314,8 +314,8 @@ void AddFriendForm::onFriendRequestAccepted()
|
|||
QPushButton* acceptButton = static_cast<QPushButton*>(sender());
|
||||
QWidget* friendWidget = acceptButton->parentWidget();
|
||||
const int index = requestsLayout->indexOf(friendWidget);
|
||||
const int indexFromEnd = requestsLayout->count() - index - 1;
|
||||
removeFriendRequestWidget(friendWidget);
|
||||
const int indexFromEnd = requestsLayout->count() - index - 1;
|
||||
const Settings::Request request = Settings::getInstance().getFriendRequest(indexFromEnd);
|
||||
emit friendRequestAccepted(ToxId(request.address).getPublicKey());
|
||||
Settings::getInstance().removeFriendRequest(indexFromEnd);
|
||||
|
@ -327,8 +327,8 @@ void AddFriendForm::onFriendRequestRejected()
|
|||
QPushButton* rejectButton = static_cast<QPushButton*>(sender());
|
||||
QWidget* friendWidget = rejectButton->parentWidget();
|
||||
const int index = requestsLayout->indexOf(friendWidget);
|
||||
const int indexFromEnd = requestsLayout->count() - index - 1;
|
||||
removeFriendRequestWidget(friendWidget);
|
||||
const int indexFromEnd = requestsLayout->count() - index - 1;
|
||||
Settings::getInstance().removeFriendRequest(indexFromEnd);
|
||||
Settings::getInstance().savePersonal();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user