Summary: | I mark feed to read all, but feed gets unread items from time to time | ||
---|---|---|---|
Product: | [Applications] akregator | Reporter: | icefox |
Component: | general | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 1.0 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
icefox
2005-04-08 17:47:31 UTC
I can confirm this for Akregator 1.0. Changed articles (other hashes but same <guid />s) are always marked as new, without respecting the "mark articles as read immediately" settings. CVS commit by osterfeld: fix some problems with deleted articles and unread. And don't mark changed articles as new when "mark articles read immediately" is used. BUG: 103502 M +7 -0 akregator_view.cpp 1.235 M +13 -11 feed.cpp 1.90 M +5 -2 myarticle.cpp 1.38 M +3 -1 mk4storage/storagemk4impl.cpp 1.4 --- kdepim/akregator/src/akregator_view.cpp #1.234:1.235 @@ -839,4 +839,11 @@ void View::slotMoveCurrentNodeRight() void View::slotNodeSelected(TreeNode* node) { + if (node) + { + kdDebug() << "node selected: " << node->title() << endl; + kdDebug() << "unread: " << node->unread() << endl; + kdDebug() << "total: " << node->totalCount() << endl; + } + if (m_displayingAboutPage) { --- kdepim/akregator/src/feed.cpp #1.89:1.90 @@ -272,12 +272,13 @@ void Feed::appendArticles(const Document if ( old == m_articles.end() ) // article not in list { - if (!markImmediatelyAsRead()) + mya.offsetFetchTime(nudge); + nudge--; + appendArticle(mya); + + if (!mya.isDeleted() && !markImmediatelyAsRead()) mya.setStatus(MyArticle::New); else mya.setStatus(MyArticle::Read); - mya.offsetFetchTime(nudge); - nudge--; - appendArticle(mya); changed = true; } @@ -286,8 +287,9 @@ void Feed::appendArticles(const Document { mya.setKeep((*old).keep()); + appendArticle(mya); // reset status to New + if (!mya.isDeleted() && !markImmediatelyAsRead()) mya.setStatus(MyArticle::New); m_articles.remove(old); - appendArticle(mya); changed = true; } @@ -339,10 +341,10 @@ void Feed::appendArticle(const MyArticle if ( a.keep() || ( !usesExpiryByAge() || !isExpired(a) ) ) // if not expired { - if (!a.isDeleted() && a.status() != MyArticle::Read) + if (!m_articles.contains(a)) { + m_articles.append(a); + if (!a.isDeleted() && a.status() != MyArticle::Read) setUnread(unread()+1); } - if (!m_articles.contains(a)) - m_articles.append(a); } } --- kdepim/akregator/src/myarticle.cpp #1.37:1.38 @@ -96,5 +96,5 @@ void MyArticle::initialize(RSS::Article if (article.meta("deleted") == "true") { // if article is in deleted state, we just add the status and omit the rest - d->status = Private::Deleted; + d->status = Private::Read | Private::Deleted; d->archive->setStatus(d->guid, d->status); } @@ -151,4 +152,6 @@ MyArticle::MyArticle(RSS::Article articl void MyArticle::setDeleted() { + if (isDeleted()) + return; setStatus(Read); d->status = Private::Deleted | Private::Read; @@ -228,5 +231,5 @@ int MyArticle::status() const void MyArticle::setStatus(int stat) { - if (d->feed) + if (d->feed && !isDeleted()) { if (stat == Read && status() != Read) --- kdepim/akregator/src/mk4storage/storagemk4impl.cpp #1.3:1.4 @@ -215,4 +215,6 @@ FeedStorage* StorageMK4Impl::archiveFor( { d->punread(findrow) = 0; + d->ptotalCount(findrow) = 0; + d->plastFetch(findrow) = 0; d->m_archiveView.Add(findrow); d->modified = true; CVS commit by osterfeld: backport of #103502 fix: respect markImmediatelyAsRead setting when updating modified articles (don't set them to New) CCBUG: 103502 M +10 -6 feed.cpp 1.84.2.2 --- kdepim/akregator/src/feed.cpp #1.84.2.1:1.84.2.2 @@ -310,11 +310,15 @@ void Feed::appendArticles(const Document } // if the article's guid is no hash but an ID, we have to check if the article was updated. That's done by comparing the hash values. - else if (!mya.guidIsHash() && mya.hash() != (*old).hash() && !mya.isDeleted()) + else if (!mya.guidIsHash() && mya.hash() != (*old).hash() && !(*old).isDeleted()) { mya.setKeep((*old).keep()); // reset status to New + if (!markImmediatelyAsRead()) + { mya.setStatus(MyArticle::New); if ((*old).status() != MyArticle::Read) m_unread--; + } + m_articles.remove(old); appendArticle(mya); Resolved? I'm running 1.1.1, and some of my feeds (e.g. golem.de) which are set to "immediately mark as read don't work that way |