UI: Improve startup-mode detection.

This commit is contained in:
Nodir Temirkhodjaev 2021-05-14 10:49:04 +03:00
parent f8b43bbf99
commit b987ea2232
2 changed files with 4 additions and 3 deletions

View File

@ -106,8 +106,8 @@ void FortManager::initialize()
setupStatManager();
setupAppInfoManager();
setupLogManager();
setupDriver();
setupLogManager();
setupAppInfoCache();
setupHostInfoCache();

View File

@ -161,8 +161,9 @@ bool StartupUtil::startService()
StartupUtil::StartupMode StartupUtil::getStartupMode()
{
return isServiceInstalled()
? (isAutorunForAllUsers() ? StartupAllUsers : StartupAllUsersBackground)
const bool isForAllUsers = isAutorunForAllUsers();
return (isForAllUsers || isServiceInstalled())
? (isForAllUsers ? StartupAllUsers : StartupAllUsersBackground)
: (isAutorunForCurrentUser() ? StartupCurrentUser : StartupDisabled);
}