mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-05-03 22:56:49 +00:00
Deactivated account is no longer a logout and is just related to registration: Keep background activities and avoid requesting passwords.
This commit is contained in:
parent
1e34883610
commit
3071729bac
3 changed files with 18 additions and 5 deletions
|
|
@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
### Added
|
||||
- Screen Sharing
|
||||
- Deactivated account is no longer a logout and is just related to registration: Keep background activities and avoid requesting passwords.
|
||||
|
||||
## 5.2.6 - 2024-07-22
|
||||
|
||||
|
|
|
|||
|
|
@ -331,6 +331,7 @@ void AccountSettingsModel::removeAccount (const shared_ptr<linphone::Account> &a
|
|||
mRemovingAccounts.push_back(account);
|
||||
}else{// Registration is not enabled : Removing without wait.
|
||||
CoreManager::getInstance()->getCore()->removeAccount(account);
|
||||
clearAuthInfo(account, false);
|
||||
}
|
||||
|
||||
emit accountSettingsUpdated();
|
||||
|
|
@ -520,6 +521,19 @@ void AccountSettingsModel::addAuthInfo (
|
|||
CoreManager::getInstance()->getCore()->addAuthInfo(authInfo);
|
||||
}
|
||||
|
||||
void AccountSettingsModel::clearAuthInfo(std::shared_ptr<linphone::Account> account, bool delay) {
|
||||
if (account) {
|
||||
auto authInfo = account->findAuthInfo();
|
||||
if(authInfo)
|
||||
if ( delay)
|
||||
QTimer::singleShot(60000, [authInfo](){// 60s is just to be sure. account_update remove deleted account only after 32s
|
||||
CoreManager::getInstance()->getCore()->removeAuthInfo(authInfo);
|
||||
});
|
||||
else
|
||||
CoreManager::getInstance()->getCore()->removeAuthInfo(authInfo);
|
||||
}
|
||||
}
|
||||
|
||||
void AccountSettingsModel::eraseAllPasswords () {
|
||||
CoreManager::getInstance()->getCore()->clearAllAuthInfo();
|
||||
}
|
||||
|
|
@ -648,11 +662,8 @@ void AccountSettingsModel::handleRegistrationStateChanged (
|
|||
auto coreManager = CoreManager::getInstance();
|
||||
shared_ptr<linphone::Account> defaultAccount = coreManager->getCore()->getDefaultAccount();
|
||||
if( state == linphone::RegistrationState::Cleared){
|
||||
auto authInfo = account->findAuthInfo();
|
||||
if(authInfo)
|
||||
QTimer::singleShot(60000, [authInfo](){// 60s is just to be sure. account_update remove deleted account only after 32s
|
||||
CoreManager::getInstance()->getCore()->removeAuthInfo(authInfo);
|
||||
});
|
||||
if (!findAccount(account->getContactAddress()))
|
||||
clearAuthInfo(account, true);
|
||||
}else if(mRemovingAccounts.contains(account)){
|
||||
mRemovingAccounts.removeAll(account);
|
||||
QTimer::singleShot(100, [account, this](){// removeAccount cannot be called from callback
|
||||
|
|
|
|||
|
|
@ -106,6 +106,7 @@ public:
|
|||
);
|
||||
|
||||
Q_INVOKABLE void eraseAllPasswords ();
|
||||
void clearAuthInfo(std::shared_ptr<linphone::Account> account, bool delay);
|
||||
|
||||
signals:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue