diff options
| author | 2023-05-16 12:09:39 +0200 | |
|---|---|---|
| committer | 2023-05-16 12:09:39 +0200 | |
| commit | ea503975d5967dd9605f8e8df8a77fc1e5bc2e3a (patch) | |
| tree | 017e977d97e74c14a609eb033d458ea16bad5312 /app/Controllers/feedController.php | |
| parent | 2038d50110468d95ff978ba2e8f997175f25ff3b (diff) | |
Fix again updateLastSeenUnchanged (#5404)
* Fix again updateLastSeenUnchanged
https://github.com/FreshRSS/FreshRSS/pull/5382 was not good enough to fix markAsReadUponGone and introduced a regression in `entry.lastSeen`.
New approach.
Follow-up of https://github.com/FreshRSS/FreshRSS/pull/5315
* Minor change of mind
* Fix handling of lastSeen
entry.lastSeen was not always correctly initialised, and sometimes overriden
Diffstat (limited to 'app/Controllers/feedController.php')
| -rw-r--r-- | app/Controllers/feedController.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php index c007c3050..554725477 100644 --- a/app/Controllers/feedController.php +++ b/app/Controllers/feedController.php @@ -465,6 +465,7 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController { continue; //Skip subsequent articles with same GUID } $newGuids[$entry->guid()] = true; + $entry->_lastSeen($mtime); if (isset($existingHashForGuids[$entry->guid()])) { $existingHash = $existingHashForGuids[$entry->guid()]; @@ -521,7 +522,7 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController { if (!$entryDAO->inTransaction()) { $entryDAO->beginTransaction(); } - $entryDAO->addEntry($entry->toArray()); + $entryDAO->addEntry($entry->toArray(), true); if (!$entry->isRead()) { $feed->incPendingUnread(); @@ -529,6 +530,7 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController { $nb_new_articles++; } } + // N.B.: Applies to _entry table and not _entrytmp: $entryDAO->updateLastSeen($feed->id(), array_keys($newGuids), $mtime); } elseif ($feedIsUnchanged) { // Feed cache was unchanged, so mark as seen the same entries as last time |
