Revert "Use QML WorkerScript for loading and updating models"
This reverts commit d8fd1ff3dd
.
This commit is contained in:
parent
ab4dfc611b
commit
4a0b3f1b12
6 changed files with 33 additions and 126 deletions
|
@ -62,10 +62,6 @@ ListModel {
|
|||
});
|
||||
}
|
||||
|
||||
property var worker: ModelWorkerScript {
|
||||
id: modelWorker
|
||||
}
|
||||
|
||||
function forEachEpisode(callback) {
|
||||
// Go from bottom up (= chronological order)
|
||||
for (var i=count-1; i>=0; i--) {
|
||||
|
@ -126,12 +122,11 @@ ListModel {
|
|||
|
||||
ready = false;
|
||||
py.call('main.load_episodes', [podcast_id, query], function (episodes) {
|
||||
modelWorker.updateModelFrom(episodeListModel, episodes, function () {
|
||||
episodeListModel.ready = true;
|
||||
if (callback !== undefined) {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
Util.updateModelFrom(episodeListModel, episodes);
|
||||
episodeListModel.ready = true;
|
||||
if (callback !== undefined) {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue