作者 邓超

x

@@ -143,6 +143,7 @@ class MailListV2 extends Base { @@ -143,6 +143,7 @@ class MailListV2 extends Base {
143 if($folder=='星标邮件'||$folder=='Starred'){ 143 if($folder=='星标邮件'||$folder=='Starred'){
144 $folder = '收件箱'; 144 $folder = '收件箱';
145 $where['flagged'] = 1; // 星标 145 $where['flagged'] = 1; // 星标
  146 + unset($where['is_hots']);
146 }elseif ($folder=='预热收件箱'){ 147 }elseif ($folder=='预热收件箱'){
147 $folder = '收件箱'; 148 $folder = '收件箱';
148 $where['is_hots'] = 1; 149 $where['is_hots'] = 1;
@@ -192,7 +193,7 @@ class MailListV2 extends Base { @@ -192,7 +193,7 @@ class MailListV2 extends Base {
192 $sql = "select %s from `lists` where ".dbWhere($where); 193 $sql = "select %s from `lists` where ".dbWhere($where);
193 194
194 /************ 2024-09-02 *************/ 195 /************ 2024-09-02 *************/
195 - if($folder=='收件箱') { 196 + if($folder=='收件箱' && empty($where['flagged'])) {
196 // 模糊标题搜索 197 // 模糊标题搜索
197 $subject = app()->request('subject'); 198 $subject = app()->request('subject');
198 if ($subject) { 199 if ($subject) {
@@ -340,7 +341,8 @@ class MailListV2 extends Base { @@ -340,7 +341,8 @@ class MailListV2 extends Base {
340 $where['flagged'] = 1; 341 $where['flagged'] = 1;
341 unset($where['folder_id']); 342 unset($where['folder_id']);
342 $where['email_id'] = $emails; 343 $where['email_id'] = $emails;
343 - $flaggedCount = db()->cache($this->cache)->count($sql . dbWhere($where)); 344 + unset($where['is_hots']);
  345 + $flaggedCount = db()->cache($this->cache)->count("select count(*) from `lists` where " . dbWhere($where));
344 } 346 }
345 347
346 $data = []; 348 $data = [];