diff options
Diffstat (limited to 'framework/domain/mailcontroller.cpp')
-rw-r--r-- | framework/domain/mailcontroller.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/framework/domain/mailcontroller.cpp b/framework/domain/mailcontroller.cpp index a65c2692..3e5e6ed4 100644 --- a/framework/domain/mailcontroller.cpp +++ b/framework/domain/mailcontroller.cpp | |||
@@ -29,6 +29,7 @@ using namespace Sink::ApplicationDomain; | |||
29 | MailController::MailController() | 29 | MailController::MailController() |
30 | : Kube::Controller(), | 30 | : Kube::Controller(), |
31 | action_markAsRead{new Kube::ControllerAction{this, &MailController::markAsRead}}, | 31 | action_markAsRead{new Kube::ControllerAction{this, &MailController::markAsRead}}, |
32 | action_markAsUnread{new Kube::ControllerAction{this, &MailController::markAsUnread}}, | ||
32 | action_markAsImportant{new Kube::ControllerAction{this, &MailController::markAsImportant}}, | 33 | action_markAsImportant{new Kube::ControllerAction{this, &MailController::markAsImportant}}, |
33 | action_moveToTrash{new Kube::ControllerAction{this, &MailController::moveToTrash}}, | 34 | action_moveToTrash{new Kube::ControllerAction{this, &MailController::moveToTrash}}, |
34 | action_restoreFromTrash{new Kube::ControllerAction{this, &MailController::restoreFromTrash}}, | 35 | action_restoreFromTrash{new Kube::ControllerAction{this, &MailController::restoreFromTrash}}, |
@@ -54,6 +55,14 @@ void MailController::markAsRead() | |||
54 | run(Store::modify(*mail)); | 55 | run(Store::modify(*mail)); |
55 | } | 56 | } |
56 | 57 | ||
58 | void MailController::markAsUnread() | ||
59 | { | ||
60 | auto mail = getMail(); | ||
61 | mail->setUnread(true); | ||
62 | SinkLog() << "Mark as unread " << mail->identifier(); | ||
63 | run(Store::modify(*mail)); | ||
64 | } | ||
65 | |||
57 | void MailController::markAsImportant() | 66 | void MailController::markAsImportant() |
58 | { | 67 | { |
59 | auto mail = getMail(); | 68 | auto mail = getMail(); |
@@ -74,7 +83,7 @@ void MailController::restoreFromTrash() | |||
74 | { | 83 | { |
75 | auto mail = getMail(); | 84 | auto mail = getMail(); |
76 | mail->setTrash(false); | 85 | mail->setTrash(false); |
77 | SinkLog() << "Move to trash " << mail->identifier(); | 86 | SinkLog() << "Restore from trash " << mail->identifier(); |
78 | run(Store::modify(*mail)); | 87 | run(Store::modify(*mail)); |
79 | } | 88 | } |
80 | 89 | ||