summaryrefslogtreecommitdiffstats
path: root/framework/qml
diff options
context:
space:
mode:
Diffstat (limited to 'framework/qml')
-rw-r--r--framework/qml/ConversationView.qml18
-rw-r--r--framework/qml/FolderListView.qml2
2 files changed, 20 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 {
diff --git a/framework/qml/FolderListView.qml b/framework/qml/FolderListView.qml
index 1455be21..734e6e10 100644
--- a/framework/qml/FolderListView.qml
+++ b/framework/qml/FolderListView.qml
@@ -29,6 +29,7 @@ Rectangle {
29 29
30 property variant currentFolder: null 30 property variant currentFolder: null
31 property variant accountId 31 property variant accountId
32 property bool isTrashFolder: false
32 33
33 color: Kube.Colors.textColor 34 color: Kube.Colors.textColor
34 35
@@ -77,6 +78,7 @@ Rectangle {
77 onCurrentIndexChanged: { 78 onCurrentIndexChanged: {
78 model.fetchMore(currentIndex) 79 model.fetchMore(currentIndex)
79 root.currentFolder = model.data(currentIndex, Kube.FolderListModel.DomainObject) 80 root.currentFolder = model.data(currentIndex, Kube.FolderListModel.DomainObject)
81 root.isTrashFolder = model.data(currentIndex, Kube.FolderListModel.Trash)
80 folderController.synchronizeAction.execute() 82 folderController.synchronizeAction.execute()
81 } 83 }
82 84