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:
parent
7bbbb7377a
commit
7f802f593e
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -68,6 +68,7 @@ private:
|
|||
void updateUserCount();
|
||||
void updateUserNames();
|
||||
void sendJoinLeaveMessages();
|
||||
void leaveGroupCall();
|
||||
|
||||
private:
|
||||
Group* group;
|
||||
|
|
Loading…
Reference in New Issue
Block a user