mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-04-17 11:58:27 +00:00
change ephemeral api from SDK update
This commit is contained in:
parent
809f7b8b67
commit
49bc5de54e
6 changed files with 10 additions and 16 deletions
|
|
@ -334,9 +334,6 @@ void ChatCore::setSelf(const QSharedPointer<ChatCore> &me) {
|
|||
});
|
||||
});
|
||||
|
||||
mChatModelConnection->makeConnectToCore(&ChatCore::lEnableEphemeral, [this](bool enable) {
|
||||
mChatModelConnection->invokeToModel([this, enable]() { mChatModel->enableEphemeral(enable); });
|
||||
});
|
||||
mChatModelConnection->makeConnectToModel(&ChatModel::ephemeralEnableChanged, [this](bool enable) {
|
||||
mChatModelConnection->invokeToCore([this, enable]() {
|
||||
if (mEphemeralEnabled != enable) {
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ public:
|
|||
Q_PROPERTY(bool isSecured READ isSecured WRITE setIsSecured NOTIFY isSecuredChanged)
|
||||
Q_PROPERTY(bool isBasic MEMBER mIsBasic CONSTANT)
|
||||
Q_PROPERTY(QString sendingText READ getSendingText WRITE setSendingText NOTIFY sendingTextChanged)
|
||||
Q_PROPERTY(bool ephemeralEnabled READ isEphemeralEnabled WRITE lEnableEphemeral NOTIFY ephemeralEnabledChanged)
|
||||
Q_PROPERTY(bool ephemeralEnabled READ isEphemeralEnabled NOTIFY ephemeralEnabledChanged)
|
||||
Q_PROPERTY(
|
||||
int ephemeralLifetime READ getEphemeralLifetime WRITE lSetEphemeralLifetime NOTIFY ephemeralLifetimeChanged)
|
||||
Q_PROPERTY(bool muted READ isMuted WRITE lSetMuted NOTIFY mutedChanged)
|
||||
|
|
@ -190,7 +190,6 @@ signals:
|
|||
void lCompose();
|
||||
void lLeave();
|
||||
void lSetMuted(bool muted);
|
||||
void lEnableEphemeral(bool enable);
|
||||
void lSetEphemeralLifetime(int time);
|
||||
void lSetSubject(QString subject);
|
||||
void lRemoveParticipant(QString sipAddress);
|
||||
|
|
|
|||
|
|
@ -147,15 +147,14 @@ void ChatModel::setMuted(bool muted) {
|
|||
emit mutedChanged(muted);
|
||||
}
|
||||
|
||||
void ChatModel::enableEphemeral(bool enable) {
|
||||
mMonitor->enableEphemeral(enable);
|
||||
emit ephemeralEnableChanged(enable);
|
||||
}
|
||||
|
||||
void ChatModel::setEphemeralLifetime(int time) {
|
||||
mMonitor->setEphemeralLifetime(time);
|
||||
if (time != 0) {
|
||||
mMonitor->activateEphemeral(time, mMonitor->getEphemeralNotReadLifetime());
|
||||
} else {
|
||||
mMonitor->deactivateEphemeral();
|
||||
}
|
||||
emit ephemeralLifetimeChanged(time);
|
||||
enableEphemeral(time != 0);
|
||||
emit ephemeralEnableChanged(time != 0);
|
||||
}
|
||||
|
||||
void ChatModel::deleteHistory() {
|
||||
|
|
|
|||
|
|
@ -80,7 +80,6 @@ public:
|
|||
void compose();
|
||||
linphone::ChatRoom::State getState() const;
|
||||
void setMuted(bool muted);
|
||||
void enableEphemeral(bool enable);
|
||||
void setEphemeralLifetime(int time);
|
||||
void setSubject(QString subject) const;
|
||||
void removeParticipant(const QString &sipAddress) const;
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ void ConferenceInfoModel::setConferenceScheduler(const std::shared_ptr<Conferenc
|
|||
// secured chatroom
|
||||
auto chatParams = params->getChatParams();
|
||||
if (!chatParams) return;
|
||||
chatParams->setEphemeralLifetime(0);
|
||||
chatParams->deactivateEphemeral();
|
||||
chatParams->setBackend(linphone::ChatRoom::Backend::FlexisipChat);
|
||||
params->setSecurityLevel(linphone::Conference::SecurityLevel::EndToEnd);
|
||||
mConferenceSchedulerModel->getMonitor()->sendInvitations(params);
|
||||
|
|
|
|||
|
|
@ -667,7 +667,7 @@ ToolModel::getChatRoomParams(std::shared_ptr<linphone::Call> call, std::shared_p
|
|||
qWarning() << "failed to get chat params from conference params, return";
|
||||
return nullptr;
|
||||
}
|
||||
chatParams->setEphemeralLifetime(0);
|
||||
chatParams->deactivateEphemeral();
|
||||
auto accountParams = account->getParams();
|
||||
auto sameDomain = remoteAddress && remoteAddress->getDomain() == SettingsModel::getInstance()->getDefaultDomain() &&
|
||||
remoteAddress->getDomain() == accountParams->getDomain();
|
||||
|
|
@ -787,7 +787,7 @@ ToolModel::createGroupChatRoom(QString subject, std::list<std::shared_ptr<linpho
|
|||
qWarning() << "failed to get chat params from conference params, return";
|
||||
return nullptr;
|
||||
}
|
||||
chatParams->setEphemeralLifetime(0);
|
||||
chatParams->deactivateEphemeral();
|
||||
chatParams->setBackend(linphone::ChatRoom::Backend::FlexisipChat);
|
||||
|
||||
auto accountParams = account->getParams();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue