diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-07-26 21:50:12 -0600 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-07-27 11:01:21 -0600 |
commit | 3b89d47fe11b09ebe2d8b5dc5b1fc36bdf066d4e (patch) | |
tree | 18aac22bdc9bac4b49697eb2b4bde2e258a763c3 /framework/qml/MailListView.qml | |
parent | 9c147a4d8a3f5054f727e2997180ae2ea6ec2549 (diff) | |
download | kube-3b89d47fe11b09ebe2d8b5dc5b1fc36bdf066d4e.tar.gz kube-3b89d47fe11b09ebe2d8b5dc5b1fc36bdf066d4e.zip |
Only set if currentItem is defined
Diffstat (limited to 'framework/qml/MailListView.qml')
-rw-r--r-- | framework/qml/MailListView.qml | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/framework/qml/MailListView.qml b/framework/qml/MailListView.qml index df8b155b..70c258e4 100644 --- a/framework/qml/MailListView.qml +++ b/framework/qml/MailListView.qml | |||
@@ -90,11 +90,13 @@ FocusScope { | |||
90 | //END keyboard nav | 90 | //END keyboard nav |
91 | 91 | ||
92 | onCurrentItemChanged: { | 92 | onCurrentItemChanged: { |
93 | root.currentMail = currentItem.currentData.mail; | 93 | if (currentItem) { |
94 | root.isDraft = currentItem.currentData.draft; | 94 | root.currentMail = currentItem.currentData.mail; |
95 | root.isTrash = currentItem.currentData.trash; | 95 | root.isDraft = currentItem.currentData.draft; |
96 | root.isImportant = currentItem.currentData.important; | 96 | root.isTrash = currentItem.currentData.trash; |
97 | root.isUnread = currentItem.currentData.unread; | 97 | root.isImportant = currentItem.currentData.important; |
98 | root.isUnread = currentItem.currentData.unread; | ||
99 | } | ||
98 | } | 100 | } |
99 | 101 | ||
100 | model: Kube.MailListModel { | 102 | model: Kube.MailListModel { |