summaryrefslogtreecommitdiffstats
path: root/accounts/kolabnow
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2018-01-24 11:25:46 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2018-01-24 11:25:46 +0100
commitbf15c3977c27536e47578e8b0ecaedb852c5ff52 (patch)
tree55fc317d968fd7688a8961251c37fbdd059fbbfa /accounts/kolabnow
parentf0d82e708e435f2d7f6d8e066481286bd023dff9 (diff)
downloadkube-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/kolabnow')
-rw-r--r--accounts/kolabnow/kolabnowsettings.cpp2
-rw-r--r--accounts/kolabnow/qml/Login.qml4
2 files changed, 1 insertions, 5 deletions
diff --git a/accounts/kolabnow/kolabnowsettings.cpp b/accounts/kolabnow/kolabnowsettings.cpp
index fe4c8c48..03c59ede 100644
--- a/accounts/kolabnow/kolabnowsettings.cpp
+++ b/accounts/kolabnow/kolabnowsettings.cpp
@@ -39,11 +39,9 @@ void KolabnowSettings::save()
39 39
40 mSmtpServer = "smtps://smtp.kolabnow.com:587"; 40 mSmtpServer = "smtps://smtp.kolabnow.com:587";
41 mSmtpUsername = mEmailAddress; 41 mSmtpUsername = mEmailAddress;
42 mSmtpPassword = mImapPassword;
43 42
44 mCardDavServer = "https://apps.kolabnow.com/addressbooks/" + mEmailAddress; 43 mCardDavServer = "https://apps.kolabnow.com/addressbooks/" + mEmailAddress;
45 mCardDavUsername = mEmailAddress; 44 mCardDavUsername = mEmailAddress;
46 mCardDavPassword = mImapPassword;
47 45
48 saveAccount(); 46 saveAccount();
49 saveImapResource(); 47 saveImapResource();
diff --git a/accounts/kolabnow/qml/Login.qml b/accounts/kolabnow/qml/Login.qml
index e416b089..856f8ba4 100644
--- a/accounts/kolabnow/qml/Login.qml
+++ b/accounts/kolabnow/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 {
@@ -55,8 +55,6 @@ Item {
55 focus: true 55 focus: true
56 56
57 placeholderText: qsTr("Password of your Kolab Now account") 57 placeholderText: qsTr("Password of your Kolab Now account")
58 text: settings.imapPassword
59 onTextChanged: settings.imapPassword = text
60 } 58 }
61 } 59 }
62} 60}