do not set the explicit presence when updating it according to the active status of the app (as it is not user initiated)

This commit is contained in:
Gaelle Braud 2025-12-11 14:22:45 +01:00
parent a75965c14e
commit 9902bb4ae7

View file

@ -708,6 +708,8 @@ void App::initCore() {
} }
checkForUpdate(); checkForUpdate();
mIsRestarting = false; mIsRestarting = false;
window->show();
window->requestActivate();
//--------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------
lDebug() << log().arg("Creating KeyboardShortcuts"); lDebug() << log().arg("Creating KeyboardShortcuts");
@ -1077,11 +1079,11 @@ void App::handleAppActivity() {
auto accountPresence = accountCore->getPresence(); auto accountPresence = accountCore->getPresence();
if ((mMainWindow && mMainWindow->isActive() || (mCallsWindow && mCallsWindow->isActive())) && if ((mMainWindow && mMainWindow->isActive() || (mCallsWindow && mCallsWindow->isActive())) &&
accountPresence == LinphoneEnums::Presence::Away) accountPresence == LinphoneEnums::Presence::Away)
accountCore->lSetPresence(LinphoneEnums::Presence::Online); accountCore->lSetPresence(LinphoneEnums::Presence::Online, false);
if (((!mMainWindow || !mMainWindow->isActive() || !mMainWindow->isVisible()) && else if (((!mMainWindow || !mMainWindow->isActive() || !mMainWindow->isVisible()) &&
(!mCallsWindow || !mCallsWindow->isActive() || !mCallsWindow->isVisible())) && (!mCallsWindow || !mCallsWindow->isActive() || !mCallsWindow->isVisible())) &&
accountPresence == LinphoneEnums::Presence::Online) accountPresence == LinphoneEnums::Presence::Online)
accountCore->lSetPresence(LinphoneEnums::Presence::Away); accountCore->lSetPresence(LinphoneEnums::Presence::Away, false);
}; };
if (mAccountList) { if (mAccountList) {
for (auto &account : mAccountList->getSharedList<AccountCore>()) for (auto &account : mAccountList->getSharedList<AccountCore>())