From 3a3125ea2b9841077c6887cb9d84db2af46c011f Mon Sep 17 00:00:00 2001 From: "Vladimir Golovnev (Glassez)" Date: Mon, 24 Apr 2017 15:50:55 +0300 Subject: [PATCH] Fix remove oldest article --- src/base/rss/rss_feed.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/base/rss/rss_feed.cpp b/src/base/rss/rss_feed.cpp index 77fc8ac93..3d1099063 100644 --- a/src/base/rss/rss_feed.cpp +++ b/src/base/rss/rss_feed.cpp @@ -340,9 +340,11 @@ bool Feed::addArticle(Article *article) void Feed::removeOldestArticle() { - auto oldestArticle = m_articlesByDate.takeLast(); - m_articles.remove(oldestArticle->guid()); + auto oldestArticle = m_articlesByDate.last(); emit articleAboutToBeRemoved(oldestArticle); + + m_articles.remove(oldestArticle->guid()); + m_articlesByDate.removeLast(); bool isRead = oldestArticle->isRead(); delete oldestArticle;