aboutsummaryrefslogtreecommitdiff
path: root/app/Models/Entry.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2024-04-26 13:29:37 +0200
committerGravatar GitHub <noreply@github.com> 2024-04-26 13:29:37 +0200
commit5ca0b893b987c2b251666adc09f1d188fc3b0017 (patch)
treebc103d5588784792d125947c8ad15843c6bd5ddc /app/Models/Entry.php
parentd656896a95fc715c2a4aba961c019339d2b84585 (diff)
Fix updated entry filters (#6334)
fix https://github.com/FreshRSS/FreshRSS/issues/6331
Diffstat (limited to 'app/Models/Entry.php')
-rw-r--r--app/Models/Entry.php13
1 files changed, 13 insertions, 0 deletions
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<string> */
@@ -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();