From 5ca0b893b987c2b251666adc09f1d188fc3b0017 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Fri, 26 Apr 2024 13:29:37 +0200 Subject: Fix updated entry filters (#6334) fix https://github.com/FreshRSS/FreshRSS/issues/6331 --- app/Models/Entry.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'app/Models/Entry.php') diff --git a/app/Models/Entry.php b/app/Models/Entry.php index c5a9ddc7e..6e59c063a 100644 --- a/app/Models/Entry.php +++ b/app/Models/Entry.php @@ -24,6 +24,7 @@ class FreshRSS_Entry extends Minz_Model { private string $hash = ''; private ?bool $is_read; private ?bool $is_favorite; + private bool $is_updated = false; private int $feedId; private ?FreshRSS_Feed $feed; /** @var array */ @@ -394,6 +395,18 @@ HTML; return $this->is_favorite; } + /** + * Returns whether the entry has been modified since it was inserted in database. + * @returns bool `true` if the entry already existed (and has been modified), `false` if the entry is new (or unmodified). + */ + public function isUpdated(): ?bool { + return $this->is_updated; + } + + public function _isUpdated(bool $value): void { + $this->is_updated = $value; + } + public function feed(): ?FreshRSS_Feed { if ($this->feed === null) { $feedDAO = FreshRSS_Factory::createFeedDao(); -- cgit v1.2.3