mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-19 12:28:08 +00:00
Option to control Ldap Friend cache clearing
This commit is contained in:
parent
98cadf8b5d
commit
6833dd10d2
3 changed files with 17 additions and 4 deletions
|
|
@ -96,10 +96,12 @@ void CoreModel::start() {
|
|||
mCore->setUserAgent(Utils::appStringToCoreString(userAgent), LINPHONESDK_VERSION);
|
||||
mCore->start();
|
||||
setPathAfterStart();
|
||||
// Remove ldap friends cache list. If not, old stored friends will take priority on merge and will not be updated
|
||||
// from new LDAP requests..
|
||||
auto ldapFriendList = mCore->getFriendListByName("ldap_friends");
|
||||
if (ldapFriendList) mCore->removeFriendList(ldapFriendList);
|
||||
if (SettingsModel::clearLocalLdapFriendsUponStartup(config)) {
|
||||
// Remove ldap friends cache list. If not, old stored friends will take priority on merge and will not be
|
||||
// updated from new LDAP requests..
|
||||
auto ldapFriendList = mCore->getFriendListByName("ldap_friends");
|
||||
if (ldapFriendList) mCore->removeFriendList(ldapFriendList);
|
||||
}
|
||||
mCore->enableFriendListSubscription(true);
|
||||
// TODO : get this from settings
|
||||
auto videoPolicy = mCore->getVideoActivationPolicy()->clone();
|
||||
|
|
|
|||
|
|
@ -603,6 +603,15 @@ QString SettingsModel::getDeviceName(const std::shared_ptr<linphone::Config> &co
|
|||
config->getString(UiSection, "device_name", Utils::appStringToCoreString(QSysInfo::machineHostName())));
|
||||
}
|
||||
|
||||
// ==============================================================================
|
||||
// Clears the local "ldap_friends" friend list upon startup (Ldap contacts cache)
|
||||
// ==============================================================================
|
||||
|
||||
bool SettingsModel::clearLocalLdapFriendsUponStartup(const shared_ptr<linphone::Config> &config) {
|
||||
mustBeInLinphoneThread(sLog().arg(Q_FUNC_INFO));
|
||||
return config ? config->getBool(UiSection, "clear_local_ldap_friends_upon_startup", false) : false;
|
||||
}
|
||||
|
||||
// =============================================================================
|
||||
// Ui.
|
||||
// =============================================================================
|
||||
|
|
|
|||
|
|
@ -143,6 +143,8 @@ public:
|
|||
|
||||
static QString getDeviceName(const std::shared_ptr<linphone::Config> &config);
|
||||
|
||||
static bool clearLocalLdapFriendsUponStartup(const std::shared_ptr<linphone::Config> &config);
|
||||
|
||||
// UI
|
||||
DECLARE_GETSET(bool, disableChatFeature, DisableChatFeature)
|
||||
DECLARE_GETSET(bool, disableMeetingsFeature, DisableMeetingsFeature)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue