fixed problem where not all selected feeds were updated
This commit is contained in:
parent
9eb41f7d61
commit
6eea00e628
|
@ -72,14 +72,17 @@ void FeedsView::setSortingEnabled(bool enable) {
|
|||
}
|
||||
|
||||
QList<Feed*> FeedsView::selectedFeeds() const {
|
||||
const QModelIndex current_index = currentIndex();
|
||||
auto its = selectedItems();
|
||||
auto std_feeds = boolinq::from(its)
|
||||
.select([](RootItem* it) {
|
||||
return it->toFeed();
|
||||
})
|
||||
.where([](Feed* fd) {
|
||||
return fd != nullptr;
|
||||
})
|
||||
.toStdList();
|
||||
|
||||
if (current_index.isValid()) {
|
||||
return m_sourceModel->feedsForIndex(m_proxyModel->mapToSource(current_index));
|
||||
}
|
||||
else {
|
||||
return QList<Feed*>();
|
||||
}
|
||||
return FROM_STD_LIST(QList<Feed*>, std_feeds);
|
||||
}
|
||||
|
||||
RootItem* FeedsView::selectedItem() const {
|
||||
|
|
Loading…
Reference in New Issue