Need to sort online when add podcast
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user