mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 11:28:07 +00:00
Conf info fixes :
set default videoconference factory uri fix conf info message ui fix conversation infos call action always update all conf info on conf info received as we don't know which account is concerned fix #LINQT-1980 display meeting detail fix #LINQT-1986 force conferenceInfoReceived signal on meeting creation fix do not add conference if state is cancelled
This commit is contained in:
parent
c007e975aa
commit
73358b7a25
12 changed files with 58 additions and 22 deletions
|
|
@ -155,6 +155,12 @@ void AccountCore::setSelf(QSharedPointer<AccountCore> me) {
|
|||
mAccountModelConnection->invokeToCore(
|
||||
[this, account, state, message]() { onRegistrationStateChanged(account, state, message); });
|
||||
});
|
||||
mAccountModelConnection->makeConnectToModel(
|
||||
&AccountModel::conferenceInformationUpdated,
|
||||
[this](const std::shared_ptr<linphone::Account> &account,
|
||||
const std::list<std::shared_ptr<linphone::ConferenceInfo>> &infos) {
|
||||
mAccountModelConnection->invokeToCore([this]() { emit conferenceInformationUpdated(); });
|
||||
});
|
||||
// From Model
|
||||
mAccountModelConnection->makeConnectToModel(&AccountModel::defaultAccountChanged, [this](bool isDefault) {
|
||||
mAccountModelConnection->invokeToCore([this, isDefault]() { onDefaultAccountChanged(isDefault); });
|
||||
|
|
|
|||
|
|
@ -193,6 +193,7 @@ public:
|
|||
signals:
|
||||
void pictureUriChanged();
|
||||
void registrationStateChanged(const QString &message);
|
||||
void conferenceInformationUpdated();
|
||||
void defaultAccountChanged(bool isDefault);
|
||||
void unreadNotificationsChanged(int unread);
|
||||
void unreadCallNotificationsChanged(int unread);
|
||||
|
|
|
|||
|
|
@ -188,6 +188,9 @@ void ConferenceInfoCore::setSelf(QSharedPointer<ConferenceInfoCore> me) {
|
|||
QString uri;
|
||||
if (state == linphone::ConferenceScheduler::State::Ready) {
|
||||
uri = mConferenceInfoModel->getConferenceScheduler()->getUri();
|
||||
emit CoreModel::getInstance() -> conferenceInfoReceived(
|
||||
CoreModel::getInstance()->getCore(),
|
||||
mConferenceInfoModel->getConferenceInfo());
|
||||
}
|
||||
mConfInfoModelConnection->invokeToCore([this, state = LinphoneEnums::fromLinphone(state),
|
||||
infoState = LinphoneEnums::fromLinphone(confInfoState),
|
||||
|
|
|
|||
|
|
@ -98,7 +98,9 @@ void ConferenceInfoList::setSelf(QSharedPointer<ConferenceInfoList> me) {
|
|||
[this](const std::shared_ptr<linphone::Core> &core,
|
||||
const std::shared_ptr<const linphone::ConferenceInfo> &conferenceInfo) {
|
||||
lDebug() << log().arg("conference info received") << conferenceInfo->getSubject();
|
||||
addConference(conferenceInfo->clone());
|
||||
// We must refresh all the conference infos cause we are not able to determine
|
||||
// which account is concerned by the signal if multiple accounts are connected
|
||||
emit lUpdate();
|
||||
});
|
||||
|
||||
// This is needed because account does not have a contact address until
|
||||
|
|
@ -109,12 +111,17 @@ void ConferenceInfoList::setSelf(QSharedPointer<ConferenceInfoList> me) {
|
|||
[this](const std::shared_ptr<linphone::Core> &core, const std::shared_ptr<linphone::Account> &account) {
|
||||
auto accountCore = account ? AccountCore::create(account) : nullptr;
|
||||
mCoreModelConnection->invokeToCore([this, accountCore] {
|
||||
if (mCurrentAccountCore)
|
||||
if (mCurrentAccountCore) {
|
||||
disconnect(mCurrentAccountCore.get(), &AccountCore::registrationStateChanged, this, nullptr);
|
||||
disconnect(mCurrentAccountCore.get(), &AccountCore::conferenceInformationUpdated, this, nullptr);
|
||||
}
|
||||
mCurrentAccountCore = accountCore;
|
||||
if (mCurrentAccountCore)
|
||||
if (mCurrentAccountCore) {
|
||||
connect(mCurrentAccountCore.get(), &AccountCore::registrationStateChanged, this,
|
||||
[this] { emit lUpdate(); });
|
||||
connect(mCurrentAccountCore.get(), &AccountCore::conferenceInformationUpdated, this,
|
||||
[this] { emit lUpdate(); });
|
||||
}
|
||||
emit lUpdate();
|
||||
});
|
||||
});
|
||||
|
|
@ -159,6 +166,7 @@ void ConferenceInfoList::addConference(const std::shared_ptr<linphone::Conferenc
|
|||
return confInfo->getUri()->weakEqual(confAddr);
|
||||
});
|
||||
if (haveConf == list.end()) {
|
||||
if (confInfo->getState() == linphone::ConferenceInfo::State::Cancelled) return;
|
||||
auto confInfoCore = build(confInfo);
|
||||
mCoreModelConnection->invokeToCore([this, confInfoCore] {
|
||||
connectItem(confInfoCore);
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
<entry name="realm" overwrite="true">sip.linphone.org</entry>
|
||||
<entry name="contact_parameters" overwrite="true">message-expires=2419200</entry>
|
||||
<entry name="conference_factory_uri" overwrite="true">sip:conference-factory@sip.linphone.org</entry>
|
||||
<!--<entry name="audio_video_conference_factory_uri" overwrite="true">sip:videoconference-factory@sip.linphone.org</entry>-->
|
||||
<entry name="audio_video_conference_factory_uri" overwrite="true">sip:videoconference-factory@sip.linphone.org</entry>
|
||||
<entry name="cpim_in_basic_chat_rooms_enabled" overwrite="true">1</entry>
|
||||
<entry name="rtp_bundle" overwrite="true">1</entry>
|
||||
<entry name="lime_server_url" overwrite="true">https://lime.linphone.org/lime-server/lime-server.php</entry>
|
||||
|
|
|
|||
|
|
@ -107,10 +107,9 @@ bool AccountManager::login(QString username,
|
|||
.arg(QStringLiteral("Unable to set identity address: `%1`."))
|
||||
.arg(Utils::coreStringToAppString(identity->asStringUriOnly()));
|
||||
|
||||
|
||||
//: "Impossible de configurer l'adresse : `%1`."
|
||||
*errorMessage =
|
||||
tr("assistant_account_login_address_configuration_error").arg(Utils::coreStringToAppString(identity->asStringUriOnly()));
|
||||
*errorMessage = tr("assistant_account_login_address_configuration_error")
|
||||
.arg(Utils::coreStringToAppString(identity->asStringUriOnly()));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -131,25 +130,26 @@ bool AccountManager::login(QString username,
|
|||
mAccountModel->setSelf(mAccountModel);
|
||||
connect(mAccountModel.get(), &AccountModel::registrationStateChanged, this,
|
||||
[this, authInfo, core](const std::shared_ptr<linphone::Account> &account, linphone::RegistrationState state,
|
||||
const std::string &message) {
|
||||
QString errorMessage = QString::fromStdString(message);
|
||||
const std::string &message) {
|
||||
QString errorMessage = QString::fromStdString(message);
|
||||
if (mAccountModel && account == mAccountModel->getAccount()) {
|
||||
if (state == linphone::RegistrationState::Failed) {
|
||||
connect(
|
||||
mAccountModel.get(), &AccountModel::removed, this, [this]() { mAccountModel = nullptr; },
|
||||
Qt::SingleShotConnection);
|
||||
//: "Le couple identifiant mot de passe ne correspond pas"
|
||||
if (account->getError() == linphone::Reason::Forbidden) errorMessage = tr("assistant_account_login_forbidden_error");
|
||||
//: "Erreur durant la connexion"
|
||||
else errorMessage = tr("assistant_account_login_error");
|
||||
mAccountModel->removeAccount();
|
||||
//: "Le couple identifiant mot de passe ne correspond pas"
|
||||
if (account->getError() == linphone::Reason::Forbidden)
|
||||
errorMessage = tr("assistant_account_login_forbidden_error");
|
||||
//: "Erreur durant la connexion"
|
||||
else errorMessage = tr("assistant_account_login_error");
|
||||
mAccountModel->removeAccount();
|
||||
} else if (state == linphone::RegistrationState::Ok) {
|
||||
core->setDefaultAccount(account);
|
||||
emit mAccountModel->removeListener();
|
||||
mAccountModel = nullptr;
|
||||
}
|
||||
}
|
||||
emit registrationStateChanged(state, errorMessage);
|
||||
}
|
||||
emit registrationStateChanged(state, errorMessage);
|
||||
});
|
||||
auto status = core->addAccount(account);
|
||||
if (status == -1) {
|
||||
|
|
|
|||
|
|
@ -86,6 +86,11 @@ void AccountModel::onRegistrationStateChanged(const std::shared_ptr<linphone::Ac
|
|||
emit registrationStateChanged(account, state, message);
|
||||
}
|
||||
|
||||
void AccountModel::onConferenceInformationUpdated(const std::shared_ptr<linphone::Account> &account,
|
||||
const std::list<std::shared_ptr<linphone::ConferenceInfo>> &infos) {
|
||||
emit conferenceInformationUpdated(account, infos);
|
||||
}
|
||||
|
||||
void AccountModel::onMessageWaitingIndicationChanged(
|
||||
const std::shared_ptr<linphone::Account> &account,
|
||||
const std::shared_ptr<const linphone::MessageWaitingIndication> &mwi) {
|
||||
|
|
@ -120,7 +125,7 @@ void AccountModel::setPictureUri(QString uri) {
|
|||
// Hack because Account doesn't provide callbacks on updated data
|
||||
// emit pictureUriChanged(uri);
|
||||
auto core = CoreModel::getInstance()->getCore();
|
||||
emit CoreModel::getInstance()->defaultAccountChanged(core, core->getDefaultAccount());
|
||||
emit CoreModel::getInstance() -> defaultAccountChanged(core, core->getDefaultAccount());
|
||||
}
|
||||
|
||||
void AccountModel::onDefaultAccountChanged() {
|
||||
|
|
@ -177,7 +182,7 @@ void AccountModel::setDisplayName(QString displayName) {
|
|||
// Hack because Account doesn't provide callbacks on updated data
|
||||
// emit displayNameChanged(displayName);
|
||||
auto core = CoreModel::getInstance()->getCore();
|
||||
emit CoreModel::getInstance()->defaultAccountChanged(core, core->getDefaultAccount());
|
||||
emit CoreModel::getInstance() -> defaultAccountChanged(core, core->getDefaultAccount());
|
||||
}
|
||||
|
||||
void AccountModel::setDialPlan(int index) {
|
||||
|
|
|
|||
|
|
@ -93,6 +93,10 @@ signals:
|
|||
void registrationStateChanged(const std::shared_ptr<linphone::Account> &account,
|
||||
linphone::RegistrationState state,
|
||||
const std::string &message);
|
||||
|
||||
void conferenceInformationUpdated(const std::shared_ptr<linphone::Account> &account,
|
||||
const std::list<std::shared_ptr<linphone::ConferenceInfo>> &infos);
|
||||
|
||||
void defaultAccountChanged(bool isDefault);
|
||||
|
||||
void pictureUriChanged(QString uri);
|
||||
|
|
@ -130,6 +134,9 @@ private:
|
|||
onMessageWaitingIndicationChanged(const std::shared_ptr<linphone::Account> &account,
|
||||
const std::shared_ptr<const linphone::MessageWaitingIndication> &mwi) override;
|
||||
|
||||
virtual void
|
||||
onConferenceInformationUpdated(const std::shared_ptr<linphone::Account> &account,
|
||||
const std::list<std::shared_ptr<linphone::ConferenceInfo>> &infos) override;
|
||||
// UserData
|
||||
static void setUserData(const std::shared_ptr<linphone::Account> &account, std::shared_ptr<AccountUserData> &data);
|
||||
static std::shared_ptr<AccountUserData> getUserData(const std::shared_ptr<linphone::Account> &account);
|
||||
|
|
|
|||
|
|
@ -187,6 +187,7 @@ ColumnLayout {
|
|||
|
||||
|
||||
Rectangle {
|
||||
visible: conferenceInfo.description.length > 0 || conferenceInfo.participantCount > 0
|
||||
Layout.fillWidth: true
|
||||
height: 10 * DefaultStyle.dp
|
||||
color: DefaultStyle.grey_100
|
||||
|
|
@ -194,6 +195,7 @@ ColumnLayout {
|
|||
z: infoControl.z + 1
|
||||
}
|
||||
Rectangle {
|
||||
visible: conferenceInfo.description.length > 0 || conferenceInfo.participantCount > 0
|
||||
Layout.fillWidth: true
|
||||
height: 10 * DefaultStyle.dp
|
||||
color: DefaultStyle.grey_0
|
||||
|
|
|
|||
|
|
@ -596,6 +596,8 @@ FocusScope {
|
|||
contentLoader.panelType = showMedias ? SelectedChatView.PanelType.Medias : SelectedChatView.PanelType.SharedFiles
|
||||
}
|
||||
onManageParticipantsRequested: contentLoader.panelType = SelectedChatView.PanelType.ManageParticipants
|
||||
onOneOneCall: (video) => mainItem.oneOneCall(video)
|
||||
onGroupCall: mainItem.groupCall()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,13 +16,15 @@ ColumnLayout {
|
|||
property var contactObj: chatGui ? UtilsCpp.findFriendByAddress(mainItem.chatCore.peerAddress) : null
|
||||
property FriendGui contact: contactObj ? contactObj.value : null
|
||||
property bool isAppFriend: contact && contact.core.isAppFriend
|
||||
property var parentView
|
||||
property bool isGroup: chatCore && chatCore.isGroupChat
|
||||
spacing: 0
|
||||
signal ephemeralSettingsRequested()
|
||||
signal showSharedFilesRequested(bool showMedias)
|
||||
signal manageParticipantsRequested()
|
||||
|
||||
signal oneOneCall(bool video)
|
||||
signal groupCall()
|
||||
|
||||
Avatar {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
contact: mainItem.contact
|
||||
|
|
@ -185,7 +187,7 @@ ColumnLayout {
|
|||
button.icon.source: AppIcons.phone
|
||||
//: "Appel"
|
||||
label: qsTr("one_one_infos_call")
|
||||
button.onClicked: mainItem.isGroup ? parentView.groupCall() : parentView.oneOneCall(false)
|
||||
button.onClicked: mainItem.isGroup ? mainItem.groupCall() : mainItem.oneOneCall(false)
|
||||
}
|
||||
LabelButton {
|
||||
text.Layout.fillWidth: true
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ AbstractMainPage {
|
|||
id: mainItem
|
||||
|
||||
property ConferenceInfoGui selectedConference
|
||||
property int meetingListCount
|
||||
property int meetingListCount: 0
|
||||
signal returnRequested()
|
||||
signal addParticipantsValidated(list<string> selectedParticipants)
|
||||
//: "Créer une réunion"
|
||||
|
|
@ -251,7 +251,7 @@ AbstractMainPage {
|
|||
searchBarText: searchBar.text
|
||||
|
||||
onCountChanged: {
|
||||
mainItem.meetingListCount = count === 0
|
||||
mainItem.meetingListCount = count
|
||||
}
|
||||
Binding {
|
||||
target: mainItem
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue