summaryrefslogtreecommitdiffstats
path: root/framework/qml/ConversationView.qml
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-04-16 22:18:02 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-04-16 22:18:02 +0200
commitec48ea0cf01d306c0a9283e485f8c37d7d4d1ebd (patch)
tree4c3a4ef28fa7aaf32968d06b4fa4244181b8f521 /framework/qml/ConversationView.qml
parentef8a9f2f1d9f91358541b83fab63603aa3001bff (diff)
downloadkube-ec48ea0cf01d306c0a9283e485f8c37d7d4d1ebd.tar.gz
kube-ec48ea0cf01d306c0a9283e485f8c37d7d4d1ebd.zip
Hide trash from non-trash conversations.
...and indicate in the conversation view if a mail has been sent or is a draft.
Diffstat (limited to 'framework/qml/ConversationView.qml')
-rw-r--r--framework/qml/ConversationView.qml18
1 files changed, 18 insertions, 0 deletions
diff --git a/framework/qml/ConversationView.qml b/framework/qml/ConversationView.qml
index 83771925..0d71dde9 100644
--- a/framework/qml/ConversationView.qml
+++ b/framework/qml/ConversationView.qml
@@ -34,6 +34,9 @@ Rectangle {
34 property int currentIndex: 0; 34 property int currentIndex: 0;
35 property bool scrollToEnd: true; 35 property bool scrollToEnd: true;
36 property variant currentMail: null; 36 property variant currentMail: null;
37 property bool hideTrash: true;
38 property bool hideNonTrash: false;
39
37 onCurrentIndexChanged: { 40 onCurrentIndexChanged: {
38 markAsReadTimer.restart(); 41 markAsReadTimer.restart();
39 } 42 }
@@ -186,6 +189,7 @@ Rectangle {
186 189
187 height: sheet.height + Kube.Units.gridUnit 190 height: sheet.height + Kube.Units.gridUnit
188 width: parent.width 191 width: parent.width
192 visible: !((root.hideTrash && model.trash) || (root.hideNonTrash && !model.trash))
189 193
190 MouseArea { 194 MouseArea {
191 anchors.fill: parent 195 anchors.fill: parent
@@ -321,6 +325,20 @@ Rectangle {
321 color: Kube.Colors.textColor 325 color: Kube.Colors.textColor
322 opacity: 0.75 326 opacity: 0.75
323 font.italic: true 327 font.italic: true
328 states: [
329 State {
330 name: "trash"; when: model.trash
331 PropertyChanges { target: subject; text: "Trash: " + model.subject }
332 },
333 State {
334 name: "draft"; when: model.draft
335 PropertyChanges { target: subject; text: "Draft: " + model.subject }
336 },
337 State {
338 name: "sent"; when: model.sent
339 PropertyChanges { target: subject; text: "Sent: " + model.subject }
340 }
341 ]
324 } 342 }
325 343
326 Text { 344 Text {