Need to sort online when add podcast

This commit is contained in:
craig.p.drummond
2013-09-20 19:55:00 +00:00
parent 1688820dbe
commit a85f588f3f
3 changed files with 8 additions and 1 deletions

View File

@@ -413,6 +413,11 @@ void OnlineService::emitDataChanged(const QModelIndex &idx)
emit static_cast<OnlineServicesModel *>(m_model)->dataChanged(idx, idx);
}
void OnlineService::emitNeedToSort()
{
emit static_cast<OnlineServicesModel *>(m_model)->needToSort();
}
void OnlineService::setBusy(bool b)
{
static_cast<OnlineServicesModel *>(m_model)->setBusy(id(), b);

View File

@@ -139,6 +139,7 @@ protected:
void emitUpdated();
void emitError(const QString &msg);
void emitDataChanged(const QModelIndex &idx);
void emitNeedToSort();
void setBusy(bool b);
void beginInsertRows(const QModelIndex &idx, int from, int to);
void endInsertRows();

View File

@@ -246,6 +246,7 @@ void PodcastService::jobFinished()
beginInsertRows(index(), childCount(), childCount());
m_childItems.append(podcast);
endInsertRows();
emitNeedToSort();
} else {
MusicLibraryItemPodcast *orig = getPodcast(j->url());
if (!orig) {
@@ -296,7 +297,7 @@ void PodcastService::jobFinished()
}
orig->save();
emitUpdated();
emitNeedToSort();
}
delete podcast;