From f25a8fb49abf8a9b7ba5d6f8fbd4c05bd647c1c0 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Fri, 22 Sep 2017 11:58:47 +0200 Subject: Fixed showing a loginview after the account setup The view managment is starting to become a mess. I guess we'll need something like a state machine in the long run managing the view transitions. --- framework/src/domain/settings/accountsettings.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'framework/src/domain') diff --git a/framework/src/domain/settings/accountsettings.cpp b/framework/src/domain/settings/accountsettings.cpp index c174adfe..acf85522 100644 --- a/framework/src/domain/settings/accountsettings.cpp +++ b/framework/src/domain/settings/accountsettings.cpp @@ -292,7 +292,9 @@ void AccountSettings::saveImapResource() {"server", mImapServer}, {"username", mImapUsername} }); - Kube::AccountKeyring{mAccountIdentifier}.storePassword(mImapIdentifier, mImapPassword); + if (!mImapPassword.isEmpty()) { + Kube::AccountKeyring{mAccountIdentifier}.storePassword(mImapIdentifier, mImapPassword); + } } void AccountSettings::saveCardDavResource() @@ -301,7 +303,9 @@ void AccountSettings::saveCardDavResource() {"server", mCardDavServer}, {"username", mCardDavUsername} }); - Kube::AccountKeyring{mAccountIdentifier}.storePassword(mCardDavIdentifier, mCardDavPassword); + if (!mCardDavPassword.isEmpty()) { + Kube::AccountKeyring{mAccountIdentifier}.storePassword(mCardDavIdentifier, mCardDavPassword); + } } void AccountSettings::saveMaildirResource() @@ -317,7 +321,9 @@ void AccountSettings::saveMailtransportResource() {"server", mSmtpServer}, {"username", mSmtpUsername} }); - Kube::AccountKeyring{mAccountIdentifier}.storePassword(mMailtransportIdentifier, mSmtpPassword); + if (!mSmtpPassword.isEmpty()) { + Kube::AccountKeyring{mAccountIdentifier}.storePassword(mMailtransportIdentifier, mSmtpPassword); + } } void AccountSettings::saveIdentity() -- cgit v1.2.3