mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-28 01:09:19 +00:00
fix #LINQT-1438 missing button in waiting room + show calls window when opening waiting room
ui fix remove participant device from list when leaving conf (bad uri)
This commit is contained in:
parent
ef18622793
commit
0f9539f37e
11 changed files with 54 additions and 36 deletions
|
|
@ -65,16 +65,12 @@ void ConferenceCore::setSelf(QSharedPointer<ConferenceCore> me) {
|
|||
mConferenceModelConnection->invokeToCore([this, device]() { setActiveSpeaker(device); });
|
||||
});
|
||||
|
||||
mConferenceModelConnection->makeConnectToModel(&ConferenceModel::participantDeviceStateChanged, [this]() {
|
||||
int count = mConferenceModel->getParticipantDeviceCount();
|
||||
mConferenceModelConnection->invokeToCore([this, count]() { setParticipantDeviceCount(count); });
|
||||
});
|
||||
|
||||
mConferenceModelConnection->makeConnectToModel(
|
||||
&ConferenceModel::conferenceStateChanged,
|
||||
[this](const std::shared_ptr<linphone::Conference> &conference, linphone::Conference::State newState) {
|
||||
if (newState != linphone::Conference::State::Created) return;
|
||||
if (!mActiveSpeaker) {
|
||||
int count = mConferenceModel->getParticipantDeviceCount();
|
||||
mConferenceModelConnection->invokeToCore([this, count]() { setParticipantDeviceCount(count); });
|
||||
if (newState == linphone::Conference::State::Created && !mActiveSpeaker) {
|
||||
if (auto participantDevice = conference->getActiveSpeakerParticipantDevice()) {
|
||||
auto device = ParticipantDeviceCore::create(participantDevice);
|
||||
mConferenceModelConnection->invokeToCore([this, device]() { setActiveSpeaker(device); });
|
||||
|
|
@ -89,25 +85,21 @@ void ConferenceCore::setSelf(QSharedPointer<ConferenceCore> me) {
|
|||
}
|
||||
}
|
||||
}
|
||||
int count = mConferenceModel->getParticipantDeviceCount();
|
||||
mConferenceModelConnection->invokeToCore([this, count]() { setParticipantDeviceCount(count); });
|
||||
});
|
||||
|
||||
mConferenceModelConnection->makeConnectToModel(
|
||||
&ConferenceModel::participantDeviceCountChanged,
|
||||
[this](const std::shared_ptr<linphone::Conference> &conference, int count) {
|
||||
if (!mActiveSpeaker) {
|
||||
if (auto participantDevice = conference->getActiveSpeakerParticipantDevice()) {
|
||||
auto device = ParticipantDeviceCore::create(participantDevice);
|
||||
mConferenceModelConnection->invokeToCore([this, device]() { setActiveSpeaker(device); });
|
||||
} else if (conference->getParticipantDeviceList().size() > 1) {
|
||||
for (auto &device : conference->getParticipantDeviceList()) {
|
||||
if (!ToolModel::isMe(device->getAddress())) {
|
||||
auto activeSpeaker = ParticipantDeviceCore::create(device);
|
||||
mConferenceModelConnection->invokeToCore(
|
||||
[this, activeSpeaker]() { setActiveSpeaker(activeSpeaker); });
|
||||
break;
|
||||
}
|
||||
if (auto participantDevice = conference->getActiveSpeakerParticipantDevice()) {
|
||||
auto device = ParticipantDeviceCore::create(participantDevice);
|
||||
mConferenceModelConnection->invokeToCore([this, device]() { setActiveSpeaker(device); });
|
||||
} else if (conference->getParticipantDeviceList().size() > 1) {
|
||||
for (auto &device : conference->getParticipantDeviceList()) {
|
||||
if (!ToolModel::isMe(device->getAddress())) {
|
||||
auto activeSpeaker = ParticipantDeviceCore::create(device);
|
||||
mConferenceModelConnection->invokeToCore(
|
||||
[this, activeSpeaker]() { setActiveSpeaker(activeSpeaker); });
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ FriendCore::FriendCore(const std::shared_ptr<linphone::Friend> &contact, bool is
|
|||
}
|
||||
mDefaultAddress = defaultAddress ? Utils::coreStringToAppString(defaultAddress->asStringUriOnly()) : QString();
|
||||
mDefaultFullAddress = defaultAddress ? Utils::coreStringToAppString(defaultAddress->asString()) : QString();
|
||||
qWarning() << mDefaultAddress << " / " << mDefaultFullAddress;
|
||||
// lDebug() << mDefaultAddress << " / " << mDefaultFullAddress;
|
||||
auto phoneNumbers = contact->getPhoneNumbersWithLabel();
|
||||
for (auto &phoneNumber : phoneNumbers) {
|
||||
mPhoneNumberList.append(
|
||||
|
|
|
|||
|
|
@ -128,17 +128,20 @@ void ParticipantDeviceList::setSelf(QSharedPointer<ParticipantDeviceList> me) {
|
|||
auto deviceCore = ParticipantDeviceCore::create(device);
|
||||
mConferenceModelConnection->invokeToCore([this, deviceCore]() {
|
||||
lDebug() << "[ParticipantDeviceList] : add a device";
|
||||
this->add(deviceCore);
|
||||
add(deviceCore);
|
||||
});
|
||||
});
|
||||
mConferenceModelConnection->makeConnectToModel(
|
||||
&ConferenceModel::participantDeviceRemoved,
|
||||
[this](const std::shared_ptr<const linphone::ParticipantDevice> &participantDevice) {
|
||||
QString uniqueAddress = Utils::coreStringToAppString(participantDevice->getAddress()->asString());
|
||||
[this](const std::shared_ptr<linphone::Conference> &conference,
|
||||
const std::shared_ptr<const linphone::ParticipantDevice> &participantDevice) {
|
||||
QString uniqueAddress =
|
||||
Utils::coreStringToAppString(participantDevice->getAddress()->asString().c_str());
|
||||
auto deviceCore = findDeviceByUniqueAddress(uniqueAddress);
|
||||
mConferenceModelConnection->invokeToCore([this, deviceCore]() {
|
||||
lDebug() << "[ParticipantDeviceList] : remove a device";
|
||||
this->remove(deviceCore);
|
||||
lDebug() << "[ParticipantDeviceList] : remove a device" << deviceCore;
|
||||
if (!remove(deviceCore))
|
||||
lWarning() << log().arg("Unable to remove") << deviceCore << "as it is not part of the list";
|
||||
});
|
||||
});
|
||||
mConferenceModelConnection->makeConnectToModel(
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ void ConferenceModel::onParticipantDeviceRemoved(
|
|||
<< participantDevice->isInConference() << "]";
|
||||
lDebug() << "Me devices : " << conference->getMe()->getDevices().size();
|
||||
if (participantDevice->screenSharingEnabled()) emit isScreenSharingEnabledChanged(false);
|
||||
emit participantDeviceRemoved(participantDevice);
|
||||
emit participantDeviceRemoved(conference, participantDevice);
|
||||
emit participantDeviceCountChanged(conference, getParticipantDeviceCount());
|
||||
}
|
||||
void ConferenceModel::onParticipantDeviceStateChanged(const std::shared_ptr<linphone::Conference> &conference,
|
||||
|
|
|
|||
|
|
@ -125,7 +125,8 @@ signals:
|
|||
void participantRemoved(const std::shared_ptr<const linphone::Participant> &participant);
|
||||
void participantAdminStatusChanged(const std::shared_ptr<const linphone::Participant> &participant);
|
||||
void participantDeviceAdded(const std::shared_ptr<linphone::ParticipantDevice> &participantDevice);
|
||||
void participantDeviceRemoved(const std::shared_ptr<const linphone::ParticipantDevice> &participantDevice);
|
||||
void participantDeviceRemoved(const std::shared_ptr<linphone::Conference> &conference,
|
||||
const std::shared_ptr<const linphone::ParticipantDevice> &participantDevice);
|
||||
void participantDeviceStateChanged(const std::shared_ptr<linphone::Conference> &conference,
|
||||
const std::shared_ptr<const linphone::ParticipantDevice> &device,
|
||||
linphone::ParticipantDevice::State state);
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ ColumnLayout {
|
|||
if (mainItem.conferenceInfo) {
|
||||
var callsWindow = UtilsCpp.getCallsWindow()
|
||||
callsWindow.setupConference(mainItem.conferenceInfo)
|
||||
callsWindow.show()
|
||||
UtilsCpp.smartShowWindow(callsWindow)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -382,7 +382,7 @@ AbstractMainPage {
|
|||
if (modelData.core.isConference) {
|
||||
var callsWindow = UtilsCpp.getCallsWindow()
|
||||
callsWindow.setupConference(modelData.core.conferenceInfo)
|
||||
callsWindow.show()
|
||||
UtilsCpp.smartShowWindow(callsWindow)
|
||||
}
|
||||
else {
|
||||
UtilsCpp.createCall(modelData.core.remoteAddress)
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ RowLayout {
|
|||
property ConferenceInfoGui conferenceInfo
|
||||
signal joinConfRequested(string uri)
|
||||
signal cancelJoiningRequested()
|
||||
signal cancelAfterJoinRequested()
|
||||
RowLayout {
|
||||
Layout.fillWidth: false
|
||||
Layout.fillHeight: false
|
||||
|
|
@ -124,7 +125,7 @@ RowLayout {
|
|||
rightPadding: 20 * DefaultStyle.dp
|
||||
topPadding: 11 * DefaultStyle.dp
|
||||
bottomPadding: 11 * DefaultStyle.dp
|
||||
text: qsTr("Join")
|
||||
text: qsTr("Rejoindre")
|
||||
onClicked: {
|
||||
settingsButton.checked = false
|
||||
stackLayout.currentIndex = 1
|
||||
|
|
@ -137,7 +138,7 @@ RowLayout {
|
|||
rightPadding: 20 * DefaultStyle.dp
|
||||
bottomPadding: 11 * DefaultStyle.dp
|
||||
inversedColors: true
|
||||
text: qsTr("Cancel")
|
||||
text: qsTr("Annuler")
|
||||
onClicked: {
|
||||
mainItem.cancelJoiningRequested()
|
||||
}
|
||||
|
|
@ -173,6 +174,20 @@ RowLayout {
|
|||
Layout.preferredWidth: 48 * DefaultStyle.dp
|
||||
Layout.preferredHeight: 48 * DefaultStyle.dp
|
||||
}
|
||||
Button {
|
||||
Layout.preferredWidth: 292 * DefaultStyle.dp
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
leftPadding: 20 * DefaultStyle.dp
|
||||
rightPadding: 20 * DefaultStyle.dp
|
||||
topPadding: 11 * DefaultStyle.dp
|
||||
bottomPadding: 11 * DefaultStyle.dp
|
||||
text: qsTr("Annuler")
|
||||
onClicked: {
|
||||
settingsButton.checked = false
|
||||
stackLayout.currentIndex = 1
|
||||
mainItem.cancelAfterJoinRequested()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -404,6 +404,7 @@ AbstractMainPage {
|
|||
font {
|
||||
pixelSize: 29 * DefaultStyle.dp
|
||||
weight: 800 * DefaultStyle.dp
|
||||
capitalization: Font.Capitalize
|
||||
}
|
||||
}
|
||||
Text {
|
||||
|
|
|
|||
|
|
@ -855,7 +855,7 @@ AbstractMainPage {
|
|||
console.log(mainItem.selectedConference.core.uri)
|
||||
var callsWindow = UtilsCpp.getCallsWindow()
|
||||
callsWindow.setupConference(mainItem.selectedConference)
|
||||
callsWindow.show()
|
||||
UtilsCpp.smartShowWindow(callsWindow)
|
||||
}
|
||||
}
|
||||
Item { Layout.fillHeight: true}
|
||||
|
|
|
|||
|
|
@ -100,6 +100,9 @@ AbstractWindow {
|
|||
autoCloseWindow.restart()
|
||||
}
|
||||
} else {
|
||||
if (middleItemStackView.currentItem.objectName === "waitingRoom") {
|
||||
middleItemStackView.replace(inCallItem)
|
||||
}
|
||||
mainWindow.call = callsModel.currentCall
|
||||
}
|
||||
}
|
||||
|
|
@ -124,6 +127,9 @@ AbstractWindow {
|
|||
}
|
||||
middleItemStackView.replace(inCallItem)
|
||||
}
|
||||
function cancelAfterJoin() {
|
||||
endCall(mainWindow.call)
|
||||
}
|
||||
|
||||
Connections {
|
||||
enabled: !!mainWindow.call
|
||||
|
|
@ -830,7 +836,6 @@ AbstractWindow {
|
|||
initialItem: participantListComp
|
||||
onCurrentItemChanged: rightPanel.headerStack.currentIndex = currentItem.Control.StackView.index
|
||||
property list<string> selectedParticipants
|
||||
signal participantAdded()
|
||||
|
||||
Connections {
|
||||
target: rightPanel
|
||||
|
|
@ -886,7 +891,6 @@ AbstractWindow {
|
|||
function onValidateRequested() {
|
||||
participantList.model.addAddresses(participantsStack.selectedParticipants)
|
||||
participantsStack.pop()
|
||||
participantsStack.participantAdded()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -980,6 +984,8 @@ AbstractWindow {
|
|||
mainWindow.joinConference(uri, {'microEnabled':microEnabled, 'localVideoEnabled':localVideoEnabled})
|
||||
}
|
||||
onCancelJoiningRequested: mainWindow.cancelJoinConference()
|
||||
onCancelAfterJoinRequested: mainWindow.cancelAfterJoin()
|
||||
|
||||
}
|
||||
}
|
||||
Component {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue