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

fix(ui): update UI when leaving group call due to being last member

This commit is contained in:
Anthony Bilinski 2019-01-25 20:55:09 -08:00
parent 7bbbb7377a
commit 7f802f593e
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C
2 changed files with 13 additions and 7 deletions

View File

@ -183,8 +183,7 @@ void GroupChatForm::onUserListChanged()
const bool online = peersCount > 1;
headWidget->updateCallButtons(online, inCall);
if (inCall && (!online || !group->isAvGroupchat())) {
Core::getInstance()->getAv()->leaveGroupCall(group->getId());
hideNetcam();
leaveGroupCall();
}
}
@ -446,11 +445,7 @@ void GroupChatForm::onCallClicked()
inCall = true;
showNetcam();
} else {
av->leaveGroupCall(group->getId());
audioInputFlag = false;
audioOutputFlag = false;
inCall = false;
hideNetcam();
leaveGroupCall();
}
const int peersCount = group->getPeersCount();
@ -575,3 +570,13 @@ void GroupChatForm::onLabelContextMenuRequested(const QPoint& localPos)
s.setBlackList(blackList);
}
}
void GroupChatForm::leaveGroupCall()
{
CoreAV* av = Core::getInstance()->getAv();
av->leaveGroupCall(group->getId());
audioInputFlag = false;
audioOutputFlag = false;
inCall = false;
hideNetcam();
}

View File

@ -68,6 +68,7 @@ private:
void updateUserCount();
void updateUserNames();
void sendJoinLeaveMessages();
void leaveGroupCall();
private:
Group* group;