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->invokeToCore([this, device]() { setActiveSpeaker(device); });
|
||||||
});
|
});
|
||||||
|
|
||||||
mConferenceModelConnection->makeConnectToModel(&ConferenceModel::participantDeviceStateChanged, [this]() {
|
|
||||||
int count = mConferenceModel->getParticipantDeviceCount();
|
|
||||||
mConferenceModelConnection->invokeToCore([this, count]() { setParticipantDeviceCount(count); });
|
|
||||||
});
|
|
||||||
|
|
||||||
mConferenceModelConnection->makeConnectToModel(
|
mConferenceModelConnection->makeConnectToModel(
|
||||||
&ConferenceModel::conferenceStateChanged,
|
&ConferenceModel::conferenceStateChanged,
|
||||||
[this](const std::shared_ptr<linphone::Conference> &conference, linphone::Conference::State newState) {
|
[this](const std::shared_ptr<linphone::Conference> &conference, linphone::Conference::State newState) {
|
||||||
if (newState != linphone::Conference::State::Created) return;
|
int count = mConferenceModel->getParticipantDeviceCount();
|
||||||
if (!mActiveSpeaker) {
|
mConferenceModelConnection->invokeToCore([this, count]() { setParticipantDeviceCount(count); });
|
||||||
|
if (newState == linphone::Conference::State::Created && !mActiveSpeaker) {
|
||||||
if (auto participantDevice = conference->getActiveSpeakerParticipantDevice()) {
|
if (auto participantDevice = conference->getActiveSpeakerParticipantDevice()) {
|
||||||
auto device = ParticipantDeviceCore::create(participantDevice);
|
auto device = ParticipantDeviceCore::create(participantDevice);
|
||||||
mConferenceModelConnection->invokeToCore([this, device]() { setActiveSpeaker(device); });
|
mConferenceModelConnection->invokeToCore([this, device]() { setActiveSpeaker(device); });
|
||||||
|
|
@ -89,14 +85,11 @@ void ConferenceCore::setSelf(QSharedPointer<ConferenceCore> me) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int count = mConferenceModel->getParticipantDeviceCount();
|
|
||||||
mConferenceModelConnection->invokeToCore([this, count]() { setParticipantDeviceCount(count); });
|
|
||||||
});
|
});
|
||||||
|
|
||||||
mConferenceModelConnection->makeConnectToModel(
|
mConferenceModelConnection->makeConnectToModel(
|
||||||
&ConferenceModel::participantDeviceCountChanged,
|
&ConferenceModel::participantDeviceCountChanged,
|
||||||
[this](const std::shared_ptr<linphone::Conference> &conference, int count) {
|
[this](const std::shared_ptr<linphone::Conference> &conference, int count) {
|
||||||
if (!mActiveSpeaker) {
|
|
||||||
if (auto participantDevice = conference->getActiveSpeakerParticipantDevice()) {
|
if (auto participantDevice = conference->getActiveSpeakerParticipantDevice()) {
|
||||||
auto device = ParticipantDeviceCore::create(participantDevice);
|
auto device = ParticipantDeviceCore::create(participantDevice);
|
||||||
mConferenceModelConnection->invokeToCore([this, device]() { setActiveSpeaker(device); });
|
mConferenceModelConnection->invokeToCore([this, device]() { setActiveSpeaker(device); });
|
||||||
|
|
@ -110,7 +103,6 @@ void ConferenceCore::setSelf(QSharedPointer<ConferenceCore> me) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
mConferenceModelConnection->invokeToCore([this, count]() { setParticipantDeviceCount(count); });
|
mConferenceModelConnection->invokeToCore([this, count]() { setParticipantDeviceCount(count); });
|
||||||
});
|
});
|
||||||
mConferenceModelConnection->makeConnectToModel(&ConferenceModel::isLocalScreenSharingChanged, [this]() {
|
mConferenceModelConnection->makeConnectToModel(&ConferenceModel::isLocalScreenSharingChanged, [this]() {
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ FriendCore::FriendCore(const std::shared_ptr<linphone::Friend> &contact, bool is
|
||||||
}
|
}
|
||||||
mDefaultAddress = defaultAddress ? Utils::coreStringToAppString(defaultAddress->asStringUriOnly()) : QString();
|
mDefaultAddress = defaultAddress ? Utils::coreStringToAppString(defaultAddress->asStringUriOnly()) : QString();
|
||||||
mDefaultFullAddress = defaultAddress ? Utils::coreStringToAppString(defaultAddress->asString()) : QString();
|
mDefaultFullAddress = defaultAddress ? Utils::coreStringToAppString(defaultAddress->asString()) : QString();
|
||||||
qWarning() << mDefaultAddress << " / " << mDefaultFullAddress;
|
// lDebug() << mDefaultAddress << " / " << mDefaultFullAddress;
|
||||||
auto phoneNumbers = contact->getPhoneNumbersWithLabel();
|
auto phoneNumbers = contact->getPhoneNumbersWithLabel();
|
||||||
for (auto &phoneNumber : phoneNumbers) {
|
for (auto &phoneNumber : phoneNumbers) {
|
||||||
mPhoneNumberList.append(
|
mPhoneNumberList.append(
|
||||||
|
|
|
||||||
|
|
@ -128,17 +128,20 @@ void ParticipantDeviceList::setSelf(QSharedPointer<ParticipantDeviceList> me) {
|
||||||
auto deviceCore = ParticipantDeviceCore::create(device);
|
auto deviceCore = ParticipantDeviceCore::create(device);
|
||||||
mConferenceModelConnection->invokeToCore([this, deviceCore]() {
|
mConferenceModelConnection->invokeToCore([this, deviceCore]() {
|
||||||
lDebug() << "[ParticipantDeviceList] : add a device";
|
lDebug() << "[ParticipantDeviceList] : add a device";
|
||||||
this->add(deviceCore);
|
add(deviceCore);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
mConferenceModelConnection->makeConnectToModel(
|
mConferenceModelConnection->makeConnectToModel(
|
||||||
&ConferenceModel::participantDeviceRemoved,
|
&ConferenceModel::participantDeviceRemoved,
|
||||||
[this](const std::shared_ptr<const linphone::ParticipantDevice> &participantDevice) {
|
[this](const std::shared_ptr<linphone::Conference> &conference,
|
||||||
QString uniqueAddress = Utils::coreStringToAppString(participantDevice->getAddress()->asString());
|
const std::shared_ptr<const linphone::ParticipantDevice> &participantDevice) {
|
||||||
|
QString uniqueAddress =
|
||||||
|
Utils::coreStringToAppString(participantDevice->getAddress()->asString().c_str());
|
||||||
auto deviceCore = findDeviceByUniqueAddress(uniqueAddress);
|
auto deviceCore = findDeviceByUniqueAddress(uniqueAddress);
|
||||||
mConferenceModelConnection->invokeToCore([this, deviceCore]() {
|
mConferenceModelConnection->invokeToCore([this, deviceCore]() {
|
||||||
lDebug() << "[ParticipantDeviceList] : remove a device";
|
lDebug() << "[ParticipantDeviceList] : remove a device" << deviceCore;
|
||||||
this->remove(deviceCore);
|
if (!remove(deviceCore))
|
||||||
|
lWarning() << log().arg("Unable to remove") << deviceCore << "as it is not part of the list";
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
mConferenceModelConnection->makeConnectToModel(
|
mConferenceModelConnection->makeConnectToModel(
|
||||||
|
|
|
||||||
|
|
@ -200,7 +200,7 @@ void ConferenceModel::onParticipantDeviceRemoved(
|
||||||
<< participantDevice->isInConference() << "]";
|
<< participantDevice->isInConference() << "]";
|
||||||
lDebug() << "Me devices : " << conference->getMe()->getDevices().size();
|
lDebug() << "Me devices : " << conference->getMe()->getDevices().size();
|
||||||
if (participantDevice->screenSharingEnabled()) emit isScreenSharingEnabledChanged(false);
|
if (participantDevice->screenSharingEnabled()) emit isScreenSharingEnabledChanged(false);
|
||||||
emit participantDeviceRemoved(participantDevice);
|
emit participantDeviceRemoved(conference, participantDevice);
|
||||||
emit participantDeviceCountChanged(conference, getParticipantDeviceCount());
|
emit participantDeviceCountChanged(conference, getParticipantDeviceCount());
|
||||||
}
|
}
|
||||||
void ConferenceModel::onParticipantDeviceStateChanged(const std::shared_ptr<linphone::Conference> &conference,
|
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 participantRemoved(const std::shared_ptr<const linphone::Participant> &participant);
|
||||||
void participantAdminStatusChanged(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 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,
|
void participantDeviceStateChanged(const std::shared_ptr<linphone::Conference> &conference,
|
||||||
const std::shared_ptr<const linphone::ParticipantDevice> &device,
|
const std::shared_ptr<const linphone::ParticipantDevice> &device,
|
||||||
linphone::ParticipantDevice::State state);
|
linphone::ParticipantDevice::State state);
|
||||||
|
|
|
||||||
|
|
@ -159,7 +159,7 @@ ColumnLayout {
|
||||||
if (mainItem.conferenceInfo) {
|
if (mainItem.conferenceInfo) {
|
||||||
var callsWindow = UtilsCpp.getCallsWindow()
|
var callsWindow = UtilsCpp.getCallsWindow()
|
||||||
callsWindow.setupConference(mainItem.conferenceInfo)
|
callsWindow.setupConference(mainItem.conferenceInfo)
|
||||||
callsWindow.show()
|
UtilsCpp.smartShowWindow(callsWindow)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -382,7 +382,7 @@ AbstractMainPage {
|
||||||
if (modelData.core.isConference) {
|
if (modelData.core.isConference) {
|
||||||
var callsWindow = UtilsCpp.getCallsWindow()
|
var callsWindow = UtilsCpp.getCallsWindow()
|
||||||
callsWindow.setupConference(modelData.core.conferenceInfo)
|
callsWindow.setupConference(modelData.core.conferenceInfo)
|
||||||
callsWindow.show()
|
UtilsCpp.smartShowWindow(callsWindow)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
UtilsCpp.createCall(modelData.core.remoteAddress)
|
UtilsCpp.createCall(modelData.core.remoteAddress)
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ RowLayout {
|
||||||
property ConferenceInfoGui conferenceInfo
|
property ConferenceInfoGui conferenceInfo
|
||||||
signal joinConfRequested(string uri)
|
signal joinConfRequested(string uri)
|
||||||
signal cancelJoiningRequested()
|
signal cancelJoiningRequested()
|
||||||
|
signal cancelAfterJoinRequested()
|
||||||
RowLayout {
|
RowLayout {
|
||||||
Layout.fillWidth: false
|
Layout.fillWidth: false
|
||||||
Layout.fillHeight: false
|
Layout.fillHeight: false
|
||||||
|
|
@ -124,7 +125,7 @@ RowLayout {
|
||||||
rightPadding: 20 * DefaultStyle.dp
|
rightPadding: 20 * DefaultStyle.dp
|
||||||
topPadding: 11 * DefaultStyle.dp
|
topPadding: 11 * DefaultStyle.dp
|
||||||
bottomPadding: 11 * DefaultStyle.dp
|
bottomPadding: 11 * DefaultStyle.dp
|
||||||
text: qsTr("Join")
|
text: qsTr("Rejoindre")
|
||||||
onClicked: {
|
onClicked: {
|
||||||
settingsButton.checked = false
|
settingsButton.checked = false
|
||||||
stackLayout.currentIndex = 1
|
stackLayout.currentIndex = 1
|
||||||
|
|
@ -137,7 +138,7 @@ RowLayout {
|
||||||
rightPadding: 20 * DefaultStyle.dp
|
rightPadding: 20 * DefaultStyle.dp
|
||||||
bottomPadding: 11 * DefaultStyle.dp
|
bottomPadding: 11 * DefaultStyle.dp
|
||||||
inversedColors: true
|
inversedColors: true
|
||||||
text: qsTr("Cancel")
|
text: qsTr("Annuler")
|
||||||
onClicked: {
|
onClicked: {
|
||||||
mainItem.cancelJoiningRequested()
|
mainItem.cancelJoiningRequested()
|
||||||
}
|
}
|
||||||
|
|
@ -173,6 +174,20 @@ RowLayout {
|
||||||
Layout.preferredWidth: 48 * DefaultStyle.dp
|
Layout.preferredWidth: 48 * DefaultStyle.dp
|
||||||
Layout.preferredHeight: 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 {
|
font {
|
||||||
pixelSize: 29 * DefaultStyle.dp
|
pixelSize: 29 * DefaultStyle.dp
|
||||||
weight: 800 * DefaultStyle.dp
|
weight: 800 * DefaultStyle.dp
|
||||||
|
capitalization: Font.Capitalize
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Text {
|
Text {
|
||||||
|
|
|
||||||
|
|
@ -855,7 +855,7 @@ AbstractMainPage {
|
||||||
console.log(mainItem.selectedConference.core.uri)
|
console.log(mainItem.selectedConference.core.uri)
|
||||||
var callsWindow = UtilsCpp.getCallsWindow()
|
var callsWindow = UtilsCpp.getCallsWindow()
|
||||||
callsWindow.setupConference(mainItem.selectedConference)
|
callsWindow.setupConference(mainItem.selectedConference)
|
||||||
callsWindow.show()
|
UtilsCpp.smartShowWindow(callsWindow)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Item { Layout.fillHeight: true}
|
Item { Layout.fillHeight: true}
|
||||||
|
|
|
||||||
|
|
@ -100,6 +100,9 @@ AbstractWindow {
|
||||||
autoCloseWindow.restart()
|
autoCloseWindow.restart()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (middleItemStackView.currentItem.objectName === "waitingRoom") {
|
||||||
|
middleItemStackView.replace(inCallItem)
|
||||||
|
}
|
||||||
mainWindow.call = callsModel.currentCall
|
mainWindow.call = callsModel.currentCall
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -124,6 +127,9 @@ AbstractWindow {
|
||||||
}
|
}
|
||||||
middleItemStackView.replace(inCallItem)
|
middleItemStackView.replace(inCallItem)
|
||||||
}
|
}
|
||||||
|
function cancelAfterJoin() {
|
||||||
|
endCall(mainWindow.call)
|
||||||
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
enabled: !!mainWindow.call
|
enabled: !!mainWindow.call
|
||||||
|
|
@ -830,7 +836,6 @@ AbstractWindow {
|
||||||
initialItem: participantListComp
|
initialItem: participantListComp
|
||||||
onCurrentItemChanged: rightPanel.headerStack.currentIndex = currentItem.Control.StackView.index
|
onCurrentItemChanged: rightPanel.headerStack.currentIndex = currentItem.Control.StackView.index
|
||||||
property list<string> selectedParticipants
|
property list<string> selectedParticipants
|
||||||
signal participantAdded()
|
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: rightPanel
|
target: rightPanel
|
||||||
|
|
@ -886,7 +891,6 @@ AbstractWindow {
|
||||||
function onValidateRequested() {
|
function onValidateRequested() {
|
||||||
participantList.model.addAddresses(participantsStack.selectedParticipants)
|
participantList.model.addAddresses(participantsStack.selectedParticipants)
|
||||||
participantsStack.pop()
|
participantsStack.pop()
|
||||||
participantsStack.participantAdded()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -980,6 +984,8 @@ AbstractWindow {
|
||||||
mainWindow.joinConference(uri, {'microEnabled':microEnabled, 'localVideoEnabled':localVideoEnabled})
|
mainWindow.joinConference(uri, {'microEnabled':microEnabled, 'localVideoEnabled':localVideoEnabled})
|
||||||
}
|
}
|
||||||
onCancelJoiningRequested: mainWindow.cancelJoinConference()
|
onCancelJoiningRequested: mainWindow.cancelJoinConference()
|
||||||
|
onCancelAfterJoinRequested: mainWindow.cancelAfterJoin()
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Component {
|
Component {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue