diff --git a/src/app/currentaccount.cpp b/src/app/currentaccount.cpp index 98fba2c1..3599828a 100644 --- a/src/app/currentaccount.cpp +++ b/src/app/currentaccount.cpp @@ -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()), diff --git a/src/app/currentaccount.h b/src/app/currentaccount.h index 5f4337aa..799a1036 100644 --- a/src/app/currentaccount.h +++ b/src/app/currentaccount.h @@ -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) diff --git a/src/app/settingsview/components/AdvancedConnectivitySettings.qml b/src/app/settingsview/components/AdvancedConnectivitySettings.qml index 5fc5f047..69f516a2 100644 --- a/src/app/settingsview/components/AdvancedConnectivitySettings.qml +++ b/src/app/settingsview/components/AdvancedConnectivitySettings.qml @@ -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 { diff --git a/src/libclient/accountmodel.cpp b/src/libclient/accountmodel.cpp index cd209494..32b7b50c 100644 --- a/src/libclient/accountmodel.cpp +++ b/src/libclient/accountmodel.cpp @@ -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; diff --git a/src/libclient/api/account.h b/src/libclient/api/account.h index a503483a..3786348d 100644 --- a/src/libclient/api/account.h +++ b/src/libclient/api/account.h @@ -190,10 +190,6 @@ struct ConfProperties_t QString uri; QString account; } RingNS; - struct Registration_t - { - int expire; - } Registration; MapStringString toDetails() const; };