diff options
Diffstat (limited to 'framework/domain/mailcontroller.cpp')
-rw-r--r-- | framework/domain/mailcontroller.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/framework/domain/mailcontroller.cpp b/framework/domain/mailcontroller.cpp index 3e5e6ed4..a5d7efb7 100644 --- a/framework/domain/mailcontroller.cpp +++ b/framework/domain/mailcontroller.cpp | |||
@@ -33,7 +33,8 @@ MailController::MailController() | |||
33 | action_markAsImportant{new Kube::ControllerAction{this, &MailController::markAsImportant}}, | 33 | action_markAsImportant{new Kube::ControllerAction{this, &MailController::markAsImportant}}, |
34 | action_moveToTrash{new Kube::ControllerAction{this, &MailController::moveToTrash}}, | 34 | action_moveToTrash{new Kube::ControllerAction{this, &MailController::moveToTrash}}, |
35 | action_restoreFromTrash{new Kube::ControllerAction{this, &MailController::restoreFromTrash}}, | 35 | action_restoreFromTrash{new Kube::ControllerAction{this, &MailController::restoreFromTrash}}, |
36 | action_remove{new Kube::ControllerAction{this, &MailController::remove}} | 36 | action_remove{new Kube::ControllerAction{this, &MailController::remove}}, |
37 | action_moveToFolder{new Kube::ControllerAction{this, &MailController::moveToFolder}} | ||
37 | { | 38 | { |
38 | QObject::connect(this, &MailController::mailChanged, &MailController::updateActions); | 39 | QObject::connect(this, &MailController::mailChanged, &MailController::updateActions); |
39 | updateActions(); | 40 | updateActions(); |
@@ -95,3 +96,12 @@ void MailController::remove() | |||
95 | run(Store::remove(*mail)); | 96 | run(Store::remove(*mail)); |
96 | } | 97 | } |
97 | 98 | ||
99 | void MailController::moveToFolder() | ||
100 | { | ||
101 | auto mail = getMail(); | ||
102 | auto targetFolder = getTargetFolder(); | ||
103 | mail->setFolder(*targetFolder); | ||
104 | SinkLog() << "Moving to folder " << mail->identifier() << targetFolder->identifier(); | ||
105 | run(Store::modify(*mail)); | ||
106 | } | ||
107 | |||