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

Commit

Permalink
fix(groups): don't add peers to netcam view until they play audio
Browse files Browse the repository at this point in the history
Fix #5536
  • Loading branch information
anthonybilinski committed Mar 8, 2019
1 parent 86415cb commit 7c13b8b
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/widget/form/groupchatform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,6 @@ void GroupChatForm::updateUserNames()
label->setProperty("peerType", LABEL_PEER_TYPE_OUR);
} else if (s.getBlackList().contains(peerPk.toString())) {
label->setProperty("peerType", LABEL_PEER_TYPE_MUTED);
} else if (netcam != nullptr) {
static_cast<GroupNetCamView*>(netcam)->addPeer(peerPk, fullName);
}

label->setStyleSheet(Style::getStylesheet(PEER_LABEL_STYLE_SHEET_PATH));
Expand Down Expand Up @@ -383,12 +381,11 @@ void GroupChatForm::peerAudioPlaying(ToxPk peerPk)
delete peerAudioTimers[peerPk];
peerAudioTimers[peerPk] = nullptr;
});

if (netcam) {
static_cast<GroupNetCamView*>(netcam)->removePeer(peerPk);
const auto nameIt = group->getPeerList().find(peerPk);
static_cast<GroupNetCamView*>(netcam)->addPeer(peerPk, nameIt.value());
}
}
if (netcam) {
static_cast<GroupNetCamView*>(netcam)->removePeer(peerPk);
const auto nameIt = group->getPeerList().find(peerPk);
static_cast<GroupNetCamView*>(netcam)->addPeer(peerPk, nameIt.value());
}

peerLabels[peerPk]->setStyleSheet(Style::getStylesheet(PEER_LABEL_STYLE_SHEET_PATH));
Expand Down

0 comments on commit 7c13b8b

Please sign in to comment.