mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 11:28:07 +00:00
Fixes on Concurrencies, Participants, WaitingRoom layout, joining participant view
This commit is contained in:
parent
3c1cde46f7
commit
abba6cffaa
7 changed files with 65 additions and 21 deletions
|
|
@ -39,9 +39,10 @@ QSharedPointer<ParticipantCore> ParticipantCore::create(const std::shared_ptr<li
|
|||
}
|
||||
|
||||
ParticipantCore::ParticipantCore(const std::shared_ptr<linphone::Participant> &participant) : QObject(nullptr) {
|
||||
mustBeInLinphoneThread(getClassName());
|
||||
if (participant) mustBeInLinphoneThread(getClassName());
|
||||
App::getInstance()->mEngine->setObjectOwnership(this, QQmlEngine::CppOwnership);
|
||||
mParticipantModel = Utils::makeQObject_ptr<ParticipantModel>(participant);
|
||||
mParticipantModel->moveToThread(CoreModel::getInstance()->thread());
|
||||
if (participant) {
|
||||
mAdminStatus = participant->isAdmin();
|
||||
mSipAddress = Utils::coreStringToAppString(participant->getAddress()->asStringUriOnly());
|
||||
|
|
|
|||
|
|
@ -137,11 +137,14 @@ std::list<std::shared_ptr<linphone::Address>> ParticipantList::getParticipants()
|
|||
}
|
||||
|
||||
bool ParticipantList::contains(const QString &address) const {
|
||||
auto testAddress = ToolModel::interpretUrl(address);
|
||||
bool exists = false;
|
||||
for (auto itParticipant = mList.begin(); !exists && itParticipant != mList.end(); ++itParticipant)
|
||||
exists = testAddress->weakEqual(
|
||||
ToolModel::interpretUrl(itParticipant->objectCast<ParticipantCore>()->getSipAddress()));
|
||||
App::postModelBlock([this, address, &exists, participants = mList]() {
|
||||
auto testAddress = ToolModel::interpretUrl(address);
|
||||
for (auto itParticipant = participants.begin(); !exists && itParticipant != participants.end(); ++itParticipant)
|
||||
exists = testAddress->weakEqual(
|
||||
ToolModel::interpretUrl(itParticipant->objectCast<ParticipantCore>()->getSipAddress()));
|
||||
});
|
||||
|
||||
return exists;
|
||||
}
|
||||
|
||||
|
|
@ -184,4 +187,4 @@ void ParticipantList::addAddress(const QString &address) {
|
|||
emit participant->lStartInvitation();
|
||||
emit countChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ DEFINE_ABSTRACT_OBJECT(ParticipantModel)
|
|||
|
||||
ParticipantModel::ParticipantModel(std::shared_ptr<linphone::Participant> linphoneParticipant, QObject *parent)
|
||||
: QObject(parent) {
|
||||
if (linphoneParticipant) mustBeInLinphoneThread(getClassName());
|
||||
mParticipant = linphoneParticipant;
|
||||
}
|
||||
|
||||
|
|
@ -61,4 +62,4 @@ bool ParticipantModel::getAdminStatus() const {
|
|||
|
||||
bool ParticipantModel::isFocus() const {
|
||||
return mParticipant->isFocus();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -732,11 +732,11 @@ Window {
|
|||
Connections {
|
||||
target: rightPanel
|
||||
// TODO : chercher comment relier ces infos pour faire le add des participants
|
||||
onValidateRequested: {
|
||||
participantList.model.addAddresses(participantsStack.selectedParticipants)
|
||||
participantsStack.pop()
|
||||
participantsStack.participantAdded()
|
||||
}
|
||||
//onValidateRequested: {
|
||||
// participantList.model.addAddresses(participantsStack.selectedParticipants)
|
||||
// participantsStack.pop()
|
||||
// participantsStack.participantAdded()
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -93,10 +93,11 @@ RowLayout {
|
|||
ColumnLayout {
|
||||
spacing: 93 * DefaultStyle.dp
|
||||
ColumnLayout {
|
||||
spacing: 5 * DefaultStyle.dp
|
||||
Layout.topMargin: 54 * DefaultStyle.dp
|
||||
spacing: 0
|
||||
Text {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Participer à :\n")
|
||||
text: qsTr("Participer à :")
|
||||
color: DefaultStyle.grey_0
|
||||
font {
|
||||
pixelSize: 30 * DefaultStyle.dp
|
||||
|
|
|
|||
|
|
@ -52,15 +52,52 @@ Item {
|
|||
anchors.fill: parent
|
||||
spacing: 0
|
||||
visible: !cameraLoader.active || cameraLoader.status != Loader.Ready || !cameraLoader.item.isReady
|
||||
Avatar{
|
||||
id: avatar
|
||||
Item{
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
// minSize = 372 => avatar = 142
|
||||
Layout.preferredHeight: background.minSize * 142 / 372
|
||||
Layout.preferredWidth: height
|
||||
account: mainItem.account
|
||||
call: !mainItem.previewEnabled ? mainItem.call : null
|
||||
address: mainItem.peerAddress
|
||||
Avatar{
|
||||
id: avatar
|
||||
anchors.fill: parent
|
||||
visible: !joiningView.visible
|
||||
account: mainItem.account
|
||||
call: !mainItem.previewEnabled ? mainItem.call : null
|
||||
address: mainItem.peerAddress
|
||||
}
|
||||
ColumnLayout{
|
||||
id: joiningView
|
||||
anchors.fill: parent
|
||||
spacing: 0
|
||||
visible: mainItem.participantDevice && (mainItem.participantDevice.core.state == LinphoneEnums.ParticipantDeviceState.Joining || mainItem.participantDevice.core.state == LinphoneEnums.ParticipantDeviceState.Alerting) || false
|
||||
Item{
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
BusyIndicator {
|
||||
Layout.preferredHeight: 27 * DefaultStyle.dp
|
||||
indicatorColor: DefaultStyle.main2_100
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
indicatorHeight: 42 * DefaultStyle.dp
|
||||
indicatorWidth: 42 * DefaultStyle.dp
|
||||
}
|
||||
Text {
|
||||
Layout.preferredHeight: 27 * DefaultStyle.dp
|
||||
Layout.topMargin: 15 * DefaultStyle.dp // (84-27)-42
|
||||
text: qsTr('rejoint...')
|
||||
color: DefaultStyle.grey_0
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
font {
|
||||
pixelSize: 20 * DefaultStyle.dp
|
||||
weight: 500 * DefaultStyle.dp
|
||||
}
|
||||
}
|
||||
Item{
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
}
|
||||
}
|
||||
Text {
|
||||
Layout.fillWidth: true
|
||||
|
|
|
|||
|
|
@ -16,7 +16,8 @@ ColumnLayout {
|
|||
readonly property string groupName: groupCallName.text
|
||||
|
||||
function clearSelectedParticipants() {
|
||||
contactList.selectedContacts.clear()
|
||||
// TODO
|
||||
//contactList.selectedContacts.clear()
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
|
|
@ -155,4 +156,4 @@ ColumnLayout {
|
|||
Item {
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue