1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

fix(login): show login screen when autologin fails

fixes #5781
This commit is contained in:
jenli669 2019-08-12 21:26:57 +02:00 committed by Anthony Bilinski
parent 040c6b95ae
commit e55e50d510
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C

View File

@ -340,8 +340,11 @@ int main(int argc, char* argv[])
// Autologin
// TODO (kriby): Shift responsibility of linking views to model objects from nexus
// Further: generate view instances separately (loginScreen, mainGUI, audio)
Profile* profile = nullptr;
if (autoLogin && Profile::exists(profileName) && !Profile::isEncrypted(profileName)) {
Profile* profile = Profile::loadProfile(profileName);
profile = Profile::loadProfile(profileName);
}
if (profile) {
settings.updateProfileData(profile);
nexus.bootstrapWithProfile(profile);
} else {