mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-04-25 15:48:34 +00:00
Avoid displaying the alone message at the start of the conference by letting time to be initialized.
This commit is contained in:
parent
15f6392bcd
commit
df8d7f2052
2 changed files with 16 additions and 6 deletions
|
|
@ -65,6 +65,7 @@ ConferenceModel::ConferenceModel (std::shared_ptr<linphone::Conference> conferen
|
||||||
mConference->addListener(mConferenceListener);
|
mConference->addListener(mConferenceListener);
|
||||||
connect(this, &ConferenceModel::participantDeviceAdded, this, &ConferenceModel::participantDeviceCountChanged);
|
connect(this, &ConferenceModel::participantDeviceAdded, this, &ConferenceModel::participantDeviceCountChanged);
|
||||||
connect(this, &ConferenceModel::participantDeviceRemoved, this, &ConferenceModel::participantDeviceCountChanged);
|
connect(this, &ConferenceModel::participantDeviceRemoved, this, &ConferenceModel::participantDeviceCountChanged);
|
||||||
|
connect(mParticipantListModel.get(), &ParticipantListModel::participantsChanged, this, &ConferenceModel::participantDeviceCountChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
ConferenceModel::~ConferenceModel(){
|
ConferenceModel::~ConferenceModel(){
|
||||||
|
|
@ -182,8 +183,10 @@ void ConferenceModel::onParticipantDeviceIsSpeakingChanged(const std::shared_ptr
|
||||||
emit participantDeviceIsSpeakingChanged(participantDevice, isSpeaking);
|
emit participantDeviceIsSpeakingChanged(participantDevice, isSpeaking);
|
||||||
}
|
}
|
||||||
void ConferenceModel::onConferenceStateChanged(linphone::Conference::State newState){
|
void ConferenceModel::onConferenceStateChanged(linphone::Conference::State newState){
|
||||||
if(newState == linphone::Conference::State::Created)
|
if(newState == linphone::Conference::State::Created){
|
||||||
setIsReady(true);
|
setIsReady(true);
|
||||||
|
emit participantDeviceCountChanged();
|
||||||
|
}
|
||||||
updateLocalParticipant();
|
updateLocalParticipant();
|
||||||
emit conferenceStateChanged(newState);
|
emit conferenceStateChanged(newState);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,9 +35,9 @@ Rectangle {
|
||||||
|
|
||||||
signal openListCallsRequest()
|
signal openListCallsRequest()
|
||||||
|
|
||||||
property int participantCount: mainItem.conferenceModel
|
property int participantCount: mainItem.conferenceModel
|
||||||
? mainItem.conferenceModel.participantDeviceCount
|
? mainItem.conferenceModel.participantDeviceCount
|
||||||
: conferenceLayout.item ? conferenceLayout.item.participantCount : 0
|
: conferenceLayout.item ? conferenceLayout.item.participantCount : 2
|
||||||
|
|
||||||
// States
|
// States
|
||||||
property bool isAudioOnly: callModel && callModel.isConference && conferenceLayout.sourceComponent == gridComponent && !callModel.videoEnabled
|
property bool isAudioOnly: callModel && callModel.isConference && conferenceLayout.sourceComponent == gridComponent && !callModel.videoEnabled
|
||||||
|
|
@ -50,8 +50,13 @@ Rectangle {
|
||||||
//: ''You are alone in this conference' : Text in message banner when the user is the only participant.
|
//: ''You are alone in this conference' : Text in message banner when the user is the only participant.
|
||||||
if( isReady && participantCount <= 1) messageBanner.noticeBannerText = qsTr('aloneInConference')
|
if( isReady && participantCount <= 1) messageBanner.noticeBannerText = qsTr('aloneInConference')
|
||||||
}
|
}
|
||||||
onParticipantCountChanged: updateMessageBanner()
|
Timer{
|
||||||
onIsReadyChanged: updateMessageBanner()
|
id: delayMessageBanner
|
||||||
|
interval: 100
|
||||||
|
onTriggered: updateMessageBanner()
|
||||||
|
}
|
||||||
|
onParticipantCountChanged: delayMessageBanner.restart()
|
||||||
|
onIsReadyChanged: delayMessageBanner.restart()
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
color: IncallStyle.backgroundColor
|
color: IncallStyle.backgroundColor
|
||||||
|
|
@ -60,7 +65,9 @@ Rectangle {
|
||||||
target: callModel
|
target: callModel
|
||||||
|
|
||||||
onCameraFirstFrameReceived: Logic.handleCameraFirstFrameReceived(width, height)
|
onCameraFirstFrameReceived: Logic.handleCameraFirstFrameReceived(width, height)
|
||||||
onStatusChanged: Logic.handleStatusChanged (status, mainItem._fullscreen)
|
onStatusChanged: {Logic.handleStatusChanged (status, mainItem._fullscreen)
|
||||||
|
delayMessageBanner.restart()
|
||||||
|
}
|
||||||
onVideoRequested: Logic.handleVideoRequested(callModel)
|
onVideoRequested: Logic.handleVideoRequested(callModel)
|
||||||
}
|
}
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue