1
0
Fork 0
mirror of https://git.jami.net/savoirfairelinux/jami-client-qt.git synced 2025-09-07 02:23:19 +02:00

sip: use latest registration expire preference

Change-Id: I0f99a159de945d2d82d77ec3a94a18027c89fa66
This commit is contained in:
Sébastien Blin 2022-08-31 12:01:59 -04:00
parent dbd7aa528e
commit 9e31eeeffc
5 changed files with 6 additions and 16 deletions

View file

@ -128,6 +128,7 @@ CurrentAccount::updateData()
set_publishedAddress(accConfig.publishedAddress, true);
set_localPort(accConfig.localPort, true);
set_publishedPort(accConfig.publishedPort, true);
set_registrationExpire(accConfig.registrationExpire, true);
// DHT
set_PublicInCallsDHT(accConfig.DHT.PublicInCalls, true);
@ -175,9 +176,6 @@ CurrentAccount::updateData()
set_ringtoneEnabledRingtone(accConfig.Ringtone.ringtoneEnabled, true);
set_ringtonePathRingtone(accConfig.Ringtone.ringtonePath, true);
// Registration
set_expireRegistration(accConfig.Registration.expire, true);
// Moderators
set_isAllModeratorsEnabled(lrcInstance_->accountModel().isAllModerators(
lrcInstance_->get_currentAccountId()),

View file

@ -129,6 +129,7 @@ class CurrentAccount final : public QObject
QML_ACCOUNT_CONFIG_SETTINGS_PROPERTY(QString, publishedAddress)
QML_ACCOUNT_CONFIG_SETTINGS_PROPERTY(int, localPort)
QML_ACCOUNT_CONFIG_SETTINGS_PROPERTY(int, publishedPort)
QML_ACCOUNT_CONFIG_SETTINGS_PROPERTY(int, registrationExpire)
// Moderator settings
Q_PROPERTY(bool isAllModeratorsEnabled READ get_isAllModeratorsEnabled WRITE
@ -184,9 +185,6 @@ class CurrentAccount final : public QObject
QML_ACCOUNT_CONFIG_CATEGORY_SETTINGS_PROPERTY(bool, ringtoneEnabled, Ringtone)
QML_ACCOUNT_CONFIG_CATEGORY_SETTINGS_PROPERTY(QString, ringtonePath, Ringtone)
// Registration settings
QML_ACCOUNT_CONFIG_CATEGORY_SETTINGS_PROPERTY(int, expire, Registration)
// NewAccount model settings
QML_NEW_ACCOUNT_MODEL_SETTINGS_PROPERTY(bool, autoTransferFromTrusted, AutoAcceptFiles)
QML_NEW_ACCOUNT_MODEL_SETTINGS_PROPERTY(bool, autoTransferFromUntrusted, AllowFromUntrusted)

View file

@ -68,9 +68,9 @@ ColumnLayout {
bottomValue: 0
topValue: 7*24*3600
valueField: CurrentAccount.expire_Registration
valueField: CurrentAccount.registrationExpire
onNewValue: CurrentAccount.expire_Registration = valueField
onNewValue: CurrentAccount.registrationExpire = valueField
}
SettingSpinBox {

View file

@ -814,6 +814,7 @@ account::Info::fromDetails(const MapStringString& details)
confProperties.publishedSameAsLocal = toBool(details[ConfProperties::PUBLISHED_SAMEAS_LOCAL]);
confProperties.localPort = toInt(details[ConfProperties::LOCAL_PORT]);
confProperties.publishedPort = toInt(details[ConfProperties::PUBLISHED_PORT]);
confProperties.registrationExpire = toInt(details[ConfProperties::Registration::EXPIRE]);
confProperties.publishedAddress = details[ConfProperties::PUBLISHED_ADDRESS];
confProperties.userAgent = details[ConfProperties::USER_AGENT];
confProperties.upnpEnabled = toBool(details[ConfProperties::UPNP_ENABLED]);
@ -904,8 +905,6 @@ account::Info::fromDetails(const MapStringString& details)
// RingNS
confProperties.RingNS.uri = details[ConfProperties::RingNS::URI];
confProperties.RingNS.account = details[ConfProperties::RingNS::ACCOUNT];
// Registration
confProperties.Registration.expire = toInt(details[ConfProperties::Registration::EXPIRE]);
// Jams
confProperties.managerUri = details[ConfProperties::MANAGER_URI];
confProperties.managerUsername = details[ConfProperties::MANAGER_USERNAME];
@ -933,6 +932,7 @@ account::ConfProperties_t::toDetails() const
details[ConfProperties::PUBLISHED_SAMEAS_LOCAL] = toQString(this->publishedSameAsLocal);
details[ConfProperties::LOCAL_PORT] = toQString(this->localPort);
details[ConfProperties::PUBLISHED_PORT] = toQString(this->publishedPort);
details[ConfProperties::Registration::EXPIRE] = toQString(this->registrationExpire);
details[ConfProperties::PUBLISHED_ADDRESS] = this->publishedAddress;
details[ConfProperties::USER_AGENT] = this->userAgent;
details[ConfProperties::UPNP_ENABLED] = toQString(this->upnpEnabled);
@ -1027,8 +1027,6 @@ account::ConfProperties_t::toDetails() const
// RingNS
details[ConfProperties::RingNS::URI] = this->RingNS.uri;
details[ConfProperties::RingNS::ACCOUNT] = this->RingNS.account;
// Registration
details[ConfProperties::Registration::EXPIRE] = toQString(this->Registration.expire);
// Manager
details[ConfProperties::MANAGER_URI] = this->managerUri;
details[ConfProperties::MANAGER_USERNAME] = this->managerUsername;

View file

@ -190,10 +190,6 @@ struct ConfProperties_t
QString uri;
QString account;
} RingNS;
struct Registration_t
{
int expire;
} Registration;
MapStringString toDetails() const;
};