作者 邓超

优化

@@ -233,6 +233,7 @@ class Msg extends Request{ @@ -233,6 +233,7 @@ class Msg extends Request{
233 * @time 2024/9/24 9:51 233 * @time 2024/9/24 9:51
234 */ 234 */
235 public function setFlags(string $flag, bool $unset = false):bool { 235 public function setFlags(string $flag, bool $unset = false):bool {
  236 + $this->folder->exec();
236 // FLAGS.SILENT 和 FLAGS 前者不返回新的标签 后者返回新的标签列表 237 // FLAGS.SILENT 和 FLAGS 前者不返回新的标签 后者返回新的标签列表
237 // UID STORE 1 +FLAGS (\Seen) 这个是添加为已读 238 // UID STORE 1 +FLAGS (\Seen) 这个是添加为已读
238 // UID STORE 1 -FLAGS (\Seen) 这个是标记为未读 239 // UID STORE 1 -FLAGS (\Seen) 这个是标记为未读
@@ -371,6 +372,7 @@ class Msg extends Request{ @@ -371,6 +372,7 @@ class Msg extends Request{
371 * @time 2024/9/24 10:47 372 * @time 2024/9/24 10:47
372 */ 373 */
373 public function move(string $folder, bool $utf7 = true):bool { 374 public function move(string $folder, bool $utf7 = true):bool {
  375 + $this->folder->exec();
374 if(!$utf7) $folder = mb_iconv($folder,"UTF7-IMAP","UTF-8"); 376 if(!$utf7) $folder = mb_iconv($folder,"UTF7-IMAP","UTF-8");
375 // "UID MOVE {$uids} \"{$folder}\"" 377 // "UID MOVE {$uids} \"{$folder}\""
376 $this->cmd('%s MOVE %s "%s"', 378 $this->cmd('%s MOVE %s "%s"',
@@ -391,6 +393,7 @@ class Msg extends Request{ @@ -391,6 +393,7 @@ class Msg extends Request{
391 * @time 2024/9/24 10:51 393 * @time 2024/9/24 10:51
392 */ 394 */
393 public function copy(string $folder, bool $utf7 = true):bool { 395 public function copy(string $folder, bool $utf7 = true):bool {
  396 + $this->folder->exec();
394 if(!$utf7) $folder = mb_iconv($folder,"UTF7-IMAP","UTF-8"); 397 if(!$utf7) $folder = mb_iconv($folder,"UTF7-IMAP","UTF-8");
395 // "UID COPY {$uids} \"{$folder}\"" 398 // "UID COPY {$uids} \"{$folder}\""
396 $this->cmd('%s COPY %s "%s"', 399 $this->cmd('%s COPY %s "%s"',