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