1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-23 21:14:33 +00:00

Fix remove oldest article

This commit is contained in:
Vladimir Golovnev (Glassez) 2017-04-24 15:50:55 +03:00 committed by Vladimir Golovnev
parent e433cbab97
commit 3a3125ea2b

View File

@ -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;