diff options
| author | 2021-09-19 10:56:38 +0200 | |
|---|---|---|
| committer | 2021-09-19 10:56:38 +0200 | |
| commit | a7aca6c0abfd905669004c1e4f7c8328060df27e (patch) | |
| tree | 3edd507ce9ce0762f0faf3c24108f3b1d24988e7 /app/Models/Entry.php | |
| parent | dfc89831d4e363f62dea9df71c6b4af21cc7d7c7 (diff) | |
Improved feed action filters (#3303)
* Re-order some feed options
* Option to auto mark as read existing titles
* Option to keep at max n unread articles per feed
Diffstat (limited to 'app/Models/Entry.php')
| -rw-r--r-- | app/Models/Entry.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/Models/Entry.php b/app/Models/Entry.php index 66e554e22..f75c0d704 100644 --- a/app/Models/Entry.php +++ b/app/Models/Entry.php @@ -341,12 +341,16 @@ class FreshRSS_Entry extends Minz_Model { return false; } - public function applyFilterActions() { + public function applyFilterActions($titlesAsRead = []) { if ($this->feed != null) { if ($this->feed->attributes('read_upon_reception') || ($this->feed->attributes('read_upon_reception') === null && FreshRSS_Context::$user_conf->mark_when['reception'])) { $this->_isRead(true); } + if (isset($titlesAsRead[$this->title()])) { + Minz_Log::debug('Mark title as read: ' . $this->title()); + $this->_isRead(true); + } foreach ($this->feed->filterActions() as $filterAction) { if ($this->matches($filterAction->booleanSearch())) { foreach ($filterAction->actions() as $action) { |
