1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-23 13:04:23 +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()
{
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;