diff options
Diffstat (limited to 'components')
-rw-r--r-- | components/kube/contents/ui/ComposerView.qml | 4 | ||||
-rw-r--r-- | components/kube/contents/ui/Kube.qml | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/components/kube/contents/ui/ComposerView.qml b/components/kube/contents/ui/ComposerView.qml index ada7796b..d7751e1a 100644 --- a/components/kube/contents/ui/ComposerView.qml +++ b/components/kube/contents/ui/ComposerView.qml | |||
@@ -31,6 +31,7 @@ Kube.View { | |||
31 | property bool newMessage: false | 31 | property bool newMessage: false |
32 | property bool loadAsDraft: false | 32 | property bool loadAsDraft: false |
33 | property variant message: {} | 33 | property variant message: {} |
34 | property variant recipients: [] | ||
34 | 35 | ||
35 | //FIXME mean hack to unfuck hiding | 36 | //FIXME mean hack to unfuck hiding |
36 | property variant _composerController: Kube.ComposerController { | 37 | property variant _composerController: Kube.ComposerController { |
@@ -53,6 +54,9 @@ Kube.View { | |||
53 | } | 54 | } |
54 | } else if (newMessage) { | 55 | } else if (newMessage) { |
55 | composerController.clear() | 56 | composerController.clear() |
57 | for (var i = 0; i < root.recipients.length; ++i) { | ||
58 | composerController.addTo(root.recipients[i]) | ||
59 | } | ||
56 | subject.forceActiveFocus() | 60 | subject.forceActiveFocus() |
57 | } | 61 | } |
58 | } | 62 | } |
diff --git a/components/kube/contents/ui/Kube.qml b/components/kube/contents/ui/Kube.qml index c4058a30..05f4fbc3 100644 --- a/components/kube/contents/ui/Kube.qml +++ b/components/kube/contents/ui/Kube.qml | |||
@@ -58,7 +58,7 @@ Controls2.ApplicationWindow { | |||
58 | 58 | ||
59 | Kube.Listener { | 59 | Kube.Listener { |
60 | filter: Kube.Messages.compose | 60 | filter: Kube.Messages.compose |
61 | onMessageReceived: kubeViews.openComposer(true) | 61 | onMessageReceived: kubeViews.openComposer(true, message.recipients) |
62 | } | 62 | } |
63 | 63 | ||
64 | //BEGIN Shortcuts | 64 | //BEGIN Shortcuts |
@@ -134,7 +134,7 @@ Controls2.ApplicationWindow { | |||
134 | Kube.IconButton { | 134 | Kube.IconButton { |
135 | id: composerButton | 135 | id: composerButton |
136 | iconName: Kube.Icons.edit_inverted | 136 | iconName: Kube.Icons.edit_inverted |
137 | onClicked: kubeViews.openComposer(false) | 137 | onClicked: kubeViews.openComposer(false, []) |
138 | activeFocusOnTab: true | 138 | activeFocusOnTab: true |
139 | checkable: true | 139 | checkable: true |
140 | Controls2.ButtonGroup.group: viewButtonGroup | 140 | Controls2.ButtonGroup.group: viewButtonGroup |
@@ -252,9 +252,9 @@ Controls2.ApplicationWindow { | |||
252 | } | 252 | } |
253 | } | 253 | } |
254 | 254 | ||
255 | function openComposer(newMessage) { | 255 | function openComposer(newMessage, recipients) { |
256 | composerButton.checked = true | 256 | composerButton.checked = true |
257 | kubeViews.push(composerView, {newMessage: newMessage}, Controls2.StackView.Immediate) | 257 | kubeViews.push(composerView, {newMessage: newMessage, recipients: recipients}, Controls2.StackView.Immediate) |
258 | } | 258 | } |
259 | function openComposerWithMail(mail, openAsDraft) { | 259 | function openComposerWithMail(mail, openAsDraft) { |
260 | composerButton.checked = true | 260 | composerButton.checked = true |