diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-06-12 22:09:59 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-06-12 22:09:59 +0200 |
commit | c8372a71b128eeb4f0440736e36c372d61b5a9a2 (patch) | |
tree | c909e0e3b6b6f91540e0de310f78d91e80888a66 | |
parent | ddda9d5ab4b8c92d1940fb236be4b9f5cb68cdbe (diff) | |
download | kube-c8372a71b128eeb4f0440736e36c372d61b5a9a2.tar.gz kube-c8372a71b128eeb4f0440736e36c372d61b5a9a2.zip |
Avoid loading a random draft on new message
-rw-r--r-- | components/kube/contents/ui/ComposerView.qml | 6 | ||||
-rw-r--r-- | components/kube/contents/ui/Kube.qml | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/components/kube/contents/ui/ComposerView.qml b/components/kube/contents/ui/ComposerView.qml index 8af5fc42..576a1590 100644 --- a/components/kube/contents/ui/ComposerView.qml +++ b/components/kube/contents/ui/ComposerView.qml | |||
@@ -47,6 +47,7 @@ Kube.View { | |||
47 | if (message) { | 47 | if (message) { |
48 | composerController.loadMessage(message, loadAsDraft) | 48 | composerController.loadMessage(message, loadAsDraft) |
49 | } else if (newMessage) { | 49 | } else if (newMessage) { |
50 | composerController.clear() | ||
50 | subject.forceActiveFocus() | 51 | subject.forceActiveFocus() |
51 | } | 52 | } |
52 | } | 53 | } |
@@ -54,6 +55,7 @@ Kube.View { | |||
54 | function closeFirstSplitIfNecessary() { | 55 | function closeFirstSplitIfNecessary() { |
55 | //Move the view forward | 56 | //Move the view forward |
56 | if (root.currentIndex == 0) { | 57 | if (root.currentIndex == 0) { |
58 | listView.currentIndex = -1 | ||
57 | root.incrementCurrentIndex() | 59 | root.incrementCurrentIndex() |
58 | } | 60 | } |
59 | } | 61 | } |
@@ -126,7 +128,9 @@ Kube.View { | |||
126 | //END keyboard nav | 128 | //END keyboard nav |
127 | 129 | ||
128 | onCurrentItemChanged: { | 130 | onCurrentItemChanged: { |
129 | root.loadMessage(currentItem.currentData.domainObject, true) | 131 | if (currentItem) { |
132 | root.loadMessage(currentItem.currentData.domainObject, true) | ||
133 | } | ||
130 | } | 134 | } |
131 | 135 | ||
132 | model: Kube.MailListModel { | 136 | model: Kube.MailListModel { |
diff --git a/components/kube/contents/ui/Kube.qml b/components/kube/contents/ui/Kube.qml index 92f12f6c..11c63a8a 100644 --- a/components/kube/contents/ui/Kube.qml +++ b/components/kube/contents/ui/Kube.qml | |||
@@ -122,7 +122,7 @@ Controls2.ApplicationWindow { | |||
122 | 122 | ||
123 | Kube.IconButton { | 123 | Kube.IconButton { |
124 | iconName: Kube.Icons.edit_inverted | 124 | iconName: Kube.Icons.edit_inverted |
125 | onClicked: kubeViews.openComposer() | 125 | onClicked: kubeViews.openComposer(false) |
126 | } | 126 | } |
127 | 127 | ||
128 | Kube.IconButton { | 128 | Kube.IconButton { |