Browse Source

Fix remove oldest article

adaptive-webui-19844
Vladimir Golovnev (Glassez) 8 years ago committed by Vladimir Golovnev
parent
commit
3a3125ea2b
  1. 6
      src/base/rss/rss_feed.cpp

6
src/base/rss/rss_feed.cpp

@ -340,9 +340,11 @@ bool Feed::addArticle(Article *article)
void Feed::removeOldestArticle() void Feed::removeOldestArticle()
{ {
auto oldestArticle = m_articlesByDate.takeLast(); auto oldestArticle = m_articlesByDate.last();
m_articles.remove(oldestArticle->guid());
emit articleAboutToBeRemoved(oldestArticle); emit articleAboutToBeRemoved(oldestArticle);
m_articles.remove(oldestArticle->guid());
m_articlesByDate.removeLast();
bool isRead = oldestArticle->isRead(); bool isRead = oldestArticle->isRead();
delete oldestArticle; delete oldestArticle;

Loading…
Cancel
Save