mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 23:28:14 +03:00
Autostart does not depend on how many accounts are configured.
Set autostart default to true. Signed-off-by: Camila <hello@camila.codes>
This commit is contained in:
parent
3bcc17b942
commit
c4095d698a
1 changed files with 4 additions and 9 deletions
|
@ -639,20 +639,15 @@ void Application::slotownCloudWizardDone(int res)
|
|||
_checkConnectionTimer.start();
|
||||
slotCheckConnection();
|
||||
|
||||
// If one account is configured: enable autostart
|
||||
#ifndef QT_DEBUG
|
||||
bool shouldSetAutoStart = AccountManager::instance()->accounts().size() == 1;
|
||||
#else
|
||||
bool shouldSetAutoStart = false;
|
||||
#endif
|
||||
bool shouldSetAutoStart = true;
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
// Don't auto start when not being 'installed'
|
||||
shouldSetAutoStart = shouldSetAutoStart
|
||||
&& QCoreApplication::applicationDirPath().startsWith("/Applications/");
|
||||
#endif
|
||||
if (shouldSetAutoStart) {
|
||||
Utility::setLaunchOnStartup(_theme->appName(), _theme->appNameGUI(), true);
|
||||
}
|
||||
|
||||
Utility::setLaunchOnStartup(_theme->appName(), _theme->appNameGUI(), shouldSetAutoStart);
|
||||
|
||||
Systray::instance()->showWindow();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue