Browse Source

fix(groups): don't add peers to netcam view until they play audio

Fix #5536
reviewable/pr5566/r2
Anthony Bilinski 6 years ago
parent
commit
7c13b8b7db
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C
  1. 13
      src/widget/form/groupchatform.cpp

13
src/widget/form/groupchatform.cpp

@ -278,8 +278,6 @@ void GroupChatForm::updateUserNames() @@ -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));
@ -383,12 +381,11 @@ void GroupChatForm::peerAudioPlaying(ToxPk peerPk) @@ -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));

Loading…
Cancel
Save