mirror of https://github.com/KDE/kasts.git
Make FeedList sorting update when the feed details (e.g. title) have been updated
This commit is contained in:
parent
074dad647b
commit
78986c5da7
|
@ -36,6 +36,14 @@ FeedsModel::FeedsModel(QObject *parent)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
connect(&Fetcher::instance(), &Fetcher::feedDetailsUpdated, this, [=](const QString &url) {
|
||||||
|
for (int i = 0; i < rowCount(QModelIndex()); i++) {
|
||||||
|
if (data(index(i, 0), UrlRole).toString() == url) {
|
||||||
|
Q_EMIT dataChanged(index(i, 0), index(i, 0));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
QHash<int, QByteArray> FeedsModel::roleNames() const
|
QHash<int, QByteArray> FeedsModel::roleNames() const
|
||||||
|
|
|
@ -239,8 +239,6 @@ Kirigami.ScrollablePage {
|
||||||
feeds[i] = feedList.model.data(feedList.selectionForContextMenu[i], FeedsModel.FeedRole);
|
feeds[i] = feedList.model.data(feedList.selectionForContextMenu[i], FeedsModel.FeedRole);
|
||||||
}
|
}
|
||||||
for (var i in feeds) {
|
for (var i in feeds) {
|
||||||
console.log(lastFeed);
|
|
||||||
console.log(feeds[i].url);
|
|
||||||
if (lastFeed === feeds[i].url) {
|
if (lastFeed === feeds[i].url) {
|
||||||
while (pageStack.depth > 1) {
|
while (pageStack.depth > 1) {
|
||||||
pageStack.pop();
|
pageStack.pop();
|
||||||
|
|
Loading…
Reference in New Issue