Browse Source

Fix Item::unreadCountChanged() emit in wrong place

adaptive-webui-19844
Vladimir Golovnev (Glassez) 7 years ago
parent
commit
f8debdea67
  1. 7
      src/base/rss/rss_folder.cpp
  2. 1
      src/base/rss/rss_folder.h

7
src/base/rss/rss_folder.cpp

@ -105,12 +105,6 @@ void Folder::handleItemUnreadCountChanged() @@ -105,12 +105,6 @@ void Folder::handleItemUnreadCountChanged()
emit unreadCountChanged(this);
}
void Folder::handleItemAboutToBeDestroyed(Item *item)
{
if (item->unreadCount() > 0)
emit unreadCountChanged(this);
}
void Folder::cleanup()
{
foreach (Item *item, items())
@ -127,7 +121,6 @@ void Folder::addItem(Item *item) @@ -127,7 +121,6 @@ void Folder::addItem(Item *item)
connect(item, &Item::articleRead, this, &Item::articleRead);
connect(item, &Item::articleAboutToBeRemoved, this, &Item::articleAboutToBeRemoved);
connect(item, &Item::unreadCountChanged, this, &Folder::handleItemUnreadCountChanged);
connect(item, &Item::aboutToBeDestroyed, this, &Folder::handleItemAboutToBeDestroyed);
emit unreadCountChanged(this);
}

1
src/base/rss/rss_folder.h

@ -59,7 +59,6 @@ namespace RSS @@ -59,7 +59,6 @@ namespace RSS
private slots:
void handleItemUnreadCountChanged();
void handleItemAboutToBeDestroyed(Item *item);
private:
void cleanup() override;

Loading…
Cancel
Save