瀏覽代碼

Do not mark important feeds as read from category (#8067)

Important feeds are not supposed to be marked as read from another view. This was already working for the main view, but this PR fixes the case of a category view.
Follow-up of:
* https://github.com/FreshRSS/FreshRSS/pull/5782
Alexandre Alapetite 6 月之前
父節點
當前提交
aeecba7b30
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      app/Models/EntryDAO.php

+ 2 - 2
app/Models/EntryDAO.php

@@ -571,9 +571,9 @@ SQL;
 UPDATE `_entry`
 SET is_read = ?
 WHERE is_read <> ? AND id <= ?
-AND id_feed IN (SELECT f.id FROM `_feed` f WHERE f.category=? AND f.priority >= ?)
+AND id_feed IN (SELECT f.id FROM `_feed` f WHERE f.category=? AND f.priority >= ? AND f.priority < ?)
 SQL;
-		$values = [$is_read ? 1 : 0, $is_read ? 1 : 0, $idMax, $id, FreshRSS_Feed::PRIORITY_CATEGORY];
+		$values = [$is_read ? 1 : 0, $is_read ? 1 : 0, $idMax, $id, FreshRSS_Feed::PRIORITY_CATEGORY, FreshRSS_Feed::PRIORITY_IMPORTANT];
 
 		[$searchValues, $search] = $this->sqlListEntriesWhere(alias: '', state: $state, filters: $filters);