mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-05-07 14:44:01 +00:00
Fix crash on conference list from std::distance.
Remove me from active speaking.
This commit is contained in:
parent
50d89c60fb
commit
4b8355901f
2 changed files with 5 additions and 3 deletions
|
|
@ -64,9 +64,10 @@ void ConferenceInfoMapModel::add(const std::shared_ptr<linphone::ConferenceInfo>
|
|||
if(sendEvents){
|
||||
int row = 0;
|
||||
auto it = mMappedList.begin();
|
||||
while(it != mMappedList.end() && it.key() < conferenceDateTimeSystem)
|
||||
while(it != mMappedList.end() && it.key() < conferenceDateTimeSystem){
|
||||
++row;
|
||||
++it;
|
||||
row = std::distance(it,mMappedList.begin());
|
||||
}
|
||||
beginInsertColumns(QModelIndex(), row, row);
|
||||
}
|
||||
mMappedList[conferenceDateTimeSystem] = proxy;
|
||||
|
|
|
|||
|
|
@ -261,7 +261,8 @@ void ParticipantDeviceListModel::onParticipantDeviceIsSpeakingChanged(const std:
|
|||
void ParticipantDeviceListModel::onParticipantDeviceSpeaking(){
|
||||
auto deviceModel = qobject_cast<ParticipantDeviceModel*>(sender());
|
||||
bool changed = (mActiveSpeakers.removeAll(deviceModel) > 0);
|
||||
if( mActiveSpeakers.size() == 0 || deviceModel->getIsSpeaking()) {// Ensure to have at least one last active speaker
|
||||
// Me should not be in the list.
|
||||
if( !deviceModel->isMe() && (mActiveSpeakers.size() == 0 || deviceModel->getIsSpeaking())) {// Ensure to have at least one last active speaker
|
||||
mActiveSpeakers.push_front(deviceModel);
|
||||
changed = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue