summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-06-22 21:10:08 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-06-22 21:10:08 +0200
commit0de58eb23927c7ecf923e2a63737c2d43b20572d (patch)
treed3da10ecb434616681f854585343042b2e0b1607
parente806a5e1b4a9236fd138719009a286bdf9cbb10f (diff)
downloadkube-0de58eb23927c7ecf923e2a63737c2d43b20572d.tar.gz
kube-0de58eb23927c7ecf923e2a63737c2d43b20572d.zip
Support the removal of drafts.
-rw-r--r--components/kube/contents/ui/ComposerView.qml25
-rw-r--r--framework/src/domain/maillistmodel.cpp3
2 files changed, 27 insertions, 1 deletions
diff --git a/components/kube/contents/ui/ComposerView.qml b/components/kube/contents/ui/ComposerView.qml
index 7bc3b061..cfc0e392 100644
--- a/components/kube/contents/ui/ComposerView.qml
+++ b/components/kube/contents/ui/ComposerView.qml
@@ -167,6 +167,8 @@ Kube.View {
167 167
168 PropertyChanges {target: background; color: Kube.Colors.highlightColor; opacity: 0.6} 168 PropertyChanges {target: background; color: Kube.Colors.highlightColor; opacity: 0.6}
169 PropertyChanges {target: subject; color: Kube.Colors.highlightedTextColor} 169 PropertyChanges {target: subject; color: Kube.Colors.highlightedTextColor}
170 PropertyChanges {target: date; visible: false}
171 PropertyChanges {target: buttons; visible: true}
170 } 172 }
171 ] 173 ]
172 174
@@ -218,6 +220,29 @@ Kube.View {
218 font.pointSize: 9 220 font.pointSize: 9
219 } 221 }
220 } 222 }
223 Row {
224 id: buttons
225
226 property bool containsMouse: deleteButton.hovered
227
228 anchors {
229 right: parent.right
230 bottom: parent.bottom
231 margins: Kube.Units.smallSpacing
232 }
233
234 visible: false
235 spacing: Kube.Units.smallSpacing
236 opacity: 0.7
237
238 Kube.IconButton {
239 id: deleteButton
240 iconName: Kube.Icons.moveToTrash
241 visible: enabled
242 enabled: !!model.mail
243 onClicked: Kube.Fabric.postMessage(Kube.Messages.moveToTrash, {"mail": model.mail})
244 }
245 }
221 } 246 }
222 } 247 }
223 } 248 }
diff --git a/framework/src/domain/maillistmodel.cpp b/framework/src/domain/maillistmodel.cpp
index 97c37384..fa0dda04 100644
--- a/framework/src/domain/maillistmodel.cpp
+++ b/framework/src/domain/maillistmodel.cpp
@@ -310,8 +310,9 @@ void MailListModel::setShowDrafts(bool)
310{ 310{
311 using namespace Sink::ApplicationDomain; 311 using namespace Sink::ApplicationDomain;
312 Sink::Query query; 312 Sink::Query query;
313 // query.setFlags(Sink::Query::LiveQuery | Sink::Query::UpdateStatus); 313 query.setFlags(Sink::Query::LiveQuery);
314 query.filter<Mail::Draft>(true); 314 query.filter<Mail::Draft>(true);
315 query.filter<Mail::Trash>(false);
315 query.request<Mail::Subject>(); 316 query.request<Mail::Subject>();
316 query.request<Mail::Sender>(); 317 query.request<Mail::Sender>();
317 query.request<Mail::To>(); 318 query.request<Mail::To>();