diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-01-24 11:25:46 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-01-24 11:25:46 +0100 |
commit | bf15c3977c27536e47578e8b0ecaedb852c5ff52 (patch) | |
tree | 55fc317d968fd7688a8961251c37fbdd059fbbfa /accounts/imap | |
parent | f0d82e708e435f2d7f6d8e066481286bd023dff9 (diff) | |
download | kube-bf15c3977c27536e47578e8b0ecaedb852c5ff52.tar.gz kube-bf15c3977c27536e47578e8b0ecaedb852c5ff52.zip |
Fixed initial account login.
Because we ended up trying to load the resources before they even
existed (directly after the account was created), we ended up creating a
second set of unconfigured resources.
Storing the password by modifying the resource was an artifact of the
past anyways, and a login function results in a cleaner system and fixes
the problem at hand.
Diffstat (limited to 'accounts/imap')
-rw-r--r-- | accounts/imap/imapsettings.cpp | 1 | ||||
-rw-r--r-- | accounts/imap/qml/Login.qml | 5 |
2 files changed, 1 insertions, 5 deletions
diff --git a/accounts/imap/imapsettings.cpp b/accounts/imap/imapsettings.cpp index a9749878..1f338e83 100644 --- a/accounts/imap/imapsettings.cpp +++ b/accounts/imap/imapsettings.cpp | |||
@@ -33,7 +33,6 @@ void ImapSettings::load() | |||
33 | 33 | ||
34 | void ImapSettings::save() | 34 | void ImapSettings::save() |
35 | { | 35 | { |
36 | mSmtpPassword = mImapPassword; | ||
37 | saveAccount(); | 36 | saveAccount(); |
38 | saveImapResource(); | 37 | saveImapResource(); |
39 | saveMailtransportResource(); | 38 | saveMailtransportResource(); |
diff --git a/accounts/imap/qml/Login.qml b/accounts/imap/qml/Login.qml index 14e13e89..c9304b0e 100644 --- a/accounts/imap/qml/Login.qml +++ b/accounts/imap/qml/Login.qml | |||
@@ -33,7 +33,7 @@ Item { | |||
33 | } | 33 | } |
34 | 34 | ||
35 | function login(){ | 35 | function login(){ |
36 | settings.save() | 36 | settings.login({accountSecret: pwField.text}) |
37 | } | 37 | } |
38 | 38 | ||
39 | GridLayout { | 39 | GridLayout { |
@@ -53,10 +53,7 @@ Item { | |||
53 | id: pwField | 53 | id: pwField |
54 | Layout.fillWidth: true | 54 | Layout.fillWidth: true |
55 | focus: true | 55 | focus: true |
56 | |||
57 | placeholderText: qsTr("Password of your IMAP account") | 56 | placeholderText: qsTr("Password of your IMAP account") |
58 | text: settings.imapPassword | ||
59 | onTextChanged: settings.imapPassword = text | ||
60 | } | 57 | } |
61 | } | 58 | } |
62 | } | 59 | } |