diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-03-26 17:07:20 +0300 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-03-26 17:21:33 +0300 |
commit | 2da6472563f6cb2226dc5ce053f11f1bbcdb7d10 (patch) | |
tree | 04e4706835e861b7f53439bb180b443c4cef8d22 /lib/Mailbox.php | |
parent | 5beabd985681ed6c9bb58c874d8fa8516fbdfe92 (diff) |
Refactor message flag logic into a service method
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/Mailbox.php')
-rw-r--r-- | lib/Mailbox.php | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/lib/Mailbox.php b/lib/Mailbox.php index 09143f70f..128fe3c06 100644 --- a/lib/Mailbox.php +++ b/lib/Mailbox.php @@ -33,7 +33,6 @@ namespace OCA\Mail; use Horde_Imap_Client; use Horde_Imap_Client_Exception; -use Horde_Imap_Client_Ids; use Horde_Imap_Client_Mailbox; use Horde_Imap_Client_Socket; use OCA\Mail\Model\IMAPMessage; @@ -323,30 +322,4 @@ class Mailbox implements IMailBox { return reset($uids); } - /** - * @param int $uid - * @param string $flag - * @param boolean $add - * - * @return void - */ - public function setMessageFlag(int $uid, string $flag, $add) { - $options = [ - 'ids' => new Horde_Imap_Client_Ids($uid) - ]; - if ($add) { - $options['add'] = [$flag]; - } else { - $options['remove'] = [$flag]; - } - $this->conn->store($this->mailBox, $options); - } - - /** - * @return Horde_Imap_Client_Mailbox - */ - public function getHordeMailBox(): Horde_Imap_Client_Mailbox { - return $this->mailBox; - } - } |