From bd62b0c97bf7aa9f4c864367a159ea479c256bc1 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Thu, 28 Jun 2018 09:02:48 +0200 Subject: Fixed mark as important --- framework/qml/Icons.qml | 1 + framework/qml/MailListView.qml | 4 ++-- framework/qml/Messages.qml | 2 +- framework/src/sinkfabric.cpp | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/framework/qml/Icons.qml b/framework/qml/Icons.qml index 79a52046..a627fab1 100644 --- a/framework/qml/Icons.qml +++ b/framework/qml/Icons.qml @@ -36,6 +36,7 @@ Item { property string markAsRead: "kuberead" property string markAsUnread: "kubeunread" property string markImportant: "kubeimportant" + property string markUnimportant: "kubeunimportant" property string undo: "edit-undo-inverted" property string moveToTrash: "kubetrash" property string edit: "document-edit" diff --git a/framework/qml/MailListView.qml b/framework/qml/MailListView.qml index 46d3146a..d82571ec 100644 --- a/framework/qml/MailListView.qml +++ b/framework/qml/MailListView.qml @@ -295,9 +295,9 @@ FocusScope { Kube.IconButton { id: importantButton - iconName: Kube.Icons.markImportant + iconName: model.important ? Kube.Icons.markImportant : Kube.Icons.markUnimportant visible: !!model.mail - onClicked: Kube.Fabric.postMessage(Kube.Messages.toggleImportant, {"mail": model.mail, "important": model.important}) + onClicked: Kube.Fabric.postMessage(Kube.Messages.setImportant, {"mail": model.mail, "important": !model.important}) activeFocusOnTab: false } diff --git a/framework/qml/Messages.qml b/framework/qml/Messages.qml index f357b78b..d9734a0a 100644 --- a/framework/qml/Messages.qml +++ b/framework/qml/Messages.qml @@ -31,7 +31,7 @@ Item { property string restoreFromTrash: "restoreFromTrash" property string markAsRead: "markAsRead" property string markAsUnread: "markAsUnread" - property string toggleImportant: "toggleImportant" + property string setImportant: "setImportant" property string moveToFolder: "moveToFolder" property string moveToDrafts: "moveToDrafts" property string unlockKeyring: "unlockKeyring" diff --git a/framework/src/sinkfabric.cpp b/framework/src/sinkfabric.cpp index 916cc8fa..42e6d817 100644 --- a/framework/src/sinkfabric.cpp +++ b/framework/src/sinkfabric.cpp @@ -108,7 +108,7 @@ public: Store::modify(*mail).exec(); } } - if (id == "toggleImportant"/*Kube::Messages::synchronize*/) { + if (id == "setImportant"/*Kube::Messages::synchronize*/) { if (auto mail = message["mail"].value()) { mail->setImportant(message["important"].toBool()); Store::modify(*mail).exec(); -- cgit v1.2.3