Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
fix(ui): update UI when leaving group call due to being last member
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonybilinski committed Mar 25, 2019
1 parent 7bbbb73 commit 7f802f5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
19 changes: 12 additions & 7 deletions src/widget/form/groupchatform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}

Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
}
1 change: 1 addition & 0 deletions src/widget/form/groupchatform.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ private slots:
void updateUserCount();
void updateUserNames();
void sendJoinLeaveMessages();
void leaveGroupCall();

private:
Group* group;
Expand Down

0 comments on commit 7f802f5

Please sign in to comment.