diff options
Diffstat (limited to 'framework/qml/MailListView.qml')
-rw-r--r-- | framework/qml/MailListView.qml | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/framework/qml/MailListView.qml b/framework/qml/MailListView.qml index 69b7d871..35c90618 100644 --- a/framework/qml/MailListView.qml +++ b/framework/qml/MailListView.qml | |||
@@ -35,9 +35,6 @@ FocusScope { | |||
35 | property bool showFilter: false | 35 | property bool showFilter: false |
36 | property string filter: null | 36 | property string filter: null |
37 | 37 | ||
38 | onCurrentMailChanged: { | ||
39 | Kube.Fabric.postMessage(Kube.Messages.markAsRead, {"mail": currentMail}) | ||
40 | } | ||
41 | onParentFolderChanged: { | 38 | onParentFolderChanged: { |
42 | currentMail = null | 39 | currentMail = null |
43 | filterField.clearSearch() | 40 | filterField.clearSearch() |
@@ -130,11 +127,16 @@ FocusScope { | |||
130 | 127 | ||
131 | onCurrentItemChanged: { | 128 | onCurrentItemChanged: { |
132 | if (currentItem) { | 129 | if (currentItem) { |
133 | root.currentMail = currentItem.currentData.mail; | 130 | var currentData = currentItem.currentData; |
134 | root.isDraft = currentItem.currentData.draft; | 131 | root.currentMail = currentData.mail; |
135 | root.isTrash = currentItem.currentData.trash; | 132 | root.isDraft = currentData.draft; |
136 | root.isImportant = currentItem.currentData.important; | 133 | root.isTrash = currentData.trash; |
137 | root.isUnread = currentItem.currentData.unread; | 134 | root.isImportant = currentData.important; |
135 | root.isUnread = currentData.unread; | ||
136 | |||
137 | if (currentData.mail && currentData.unread) { | ||
138 | Kube.Fabric.postMessage(Kube.Messages.markAsRead, {"mail": currentData.mail}) | ||
139 | } | ||
138 | } | 140 | } |
139 | } | 141 | } |
140 | 142 | ||