Cleanup SequenceSet

This commit is contained in:
the-djmaze 2023-12-26 16:26:12 +01:00
parent 501b0daa09
commit ef850e37f7
3 changed files with 5 additions and 2 deletions

View file

@ -289,7 +289,7 @@ trait Messages
$this->FolderSelect($sFolderName); $this->FolderSelect($sFolderName);
$iNewUid = $this->MessageAppendStream($sFolderName, $rMessageStream, $iStreamSize, $aFlagsList, $iDateTime); $iNewUid = $this->MessageAppendStream($sFolderName, $rMessageStream, $iStreamSize, $aFlagsList, $iDateTime);
if ($iUid) { if ($iUid) {
$oRange = new SequenceSet([$iUid]); $oRange = new SequenceSet($iUid);
$this->MessageStoreFlag($oRange, $this->MessageStoreFlag($oRange,
array(MessageFlag::DELETED), array(MessageFlag::DELETED),
StoreAction::ADD_FLAGS_SILENT StoreAction::ADD_FLAGS_SILENT

View file

@ -28,6 +28,9 @@ class SequenceSet /*extends \SplFixedArray*/ implements \Countable
private array $data = []; private array $data = [];
/**
* @param mixed $mItems Can be array, string or int
*/
public function __construct($mItems, bool $uid = true) public function __construct($mItems, bool $uid = true)
{ {
if (\is_array($mItems)) { if (\is_array($mItems)) {

View file

@ -198,7 +198,7 @@ class Sync
); );
if ($iAppendUid && $aFlags) { if ($iAppendUid && $aFlags) {
$this->MessageStoreFlag( $this->MessageStoreFlag(
new SequenceSet([$iAppendUid]), new SequenceSet($iAppendUid),
$aFlags, $aFlags,
\MailSo\Imap\Enumerations\StoreAction::ADD_FLAGS_SILENT \MailSo\Imap\Enumerations\StoreAction::ADD_FLAGS_SILENT
); );