aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers/feedController.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Controllers/feedController.php')
-rwxr-xr-xapp/Controllers/feedController.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php
index cd4039470..758f39c88 100755
--- a/app/Controllers/feedController.php
+++ b/app/Controllers/feedController.php
@@ -432,11 +432,7 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController {
} else { //This entry already exists but has been updated
//Minz_Log::debug('Entry with GUID `' . $entry->guid() . '` updated in feed ' . $feed->url(false) .
//', old hash ' . $existingHash . ', new hash ' . $entry->hash());
- $needFeedCacheRefresh = $mark_updated_article_unread;
$entry->_isRead($mark_updated_article_unread ? false : null); //Change is_read according to policy.
- if ($mark_updated_article_unread) {
- $feed->incPendingUnread(); //Maybe
- }
$entry = Minz_ExtensionManager::callHook('entry_before_insert', $entry);
if ($entry === null) {
@@ -444,6 +440,11 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController {
continue;
}
+ if (!$entry->isRead()) {
+ $needFeedCacheRefresh = true;
+ $feed->incPendingUnread(); //Maybe
+ }
+
// If the entry has changed, there is a good chance for the full content to have changed as well.
$entry->loadCompleteContent(true);
@@ -480,7 +481,10 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController {
$entryDAO->beginTransaction();
}
$entryDAO->addEntry($entry->toArray());
- $feed->incPendingUnread();
+
+ if (!$entry->isRead()) {
+ $feed->incPendingUnread();
+ }
$nb_new_articles++;
}
}